Re: [PATCH 2/4] dpt_i2o: move from virt_to_bus/bus_to_virt to dma_alloc_coherent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2008-05-02 at 13:25 +0200, Rolf Eike Beer wrote:
> Miquel van Smoorenburg wrote:
> > [PATCH 2/4] dpt_i2o: move from virt_to_bus/bus_to_virt to
> > dma_alloc_coherent
> >
> > Remove virt_to_bus/bus_to_virt code from dpt_i2o, and use
> > dma_alloc_coherent() / dma_free_coherent().
> >
> > *==========================================================================
> >== */
> >
> > +static inline u32 dma_high(dma_addr_t addr)
> > +{
> > +	return upper_32_bits(addr);
> > +}
> > +
> > +static inline u32 dma_low(dma_addr_t addr)
> > +{
> > +	return (u32)addr;
> > +}
> > +
> 
> Just use these instructions directly, no need to introduce functions for that.

I think it makes it more readable. They are inline functions (used like
macro's, really), there's no overhead. Is this against the kernel
codingstyle ?

Mike.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux