Re: [PATCH 04/12] libata: kill ata_id_to_dma_mode()

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

 



Alan Cox wrote:
> On Tue,  6 Nov 2007 14:39:02 +0900
> Tejun Heo <htejun@xxxxxxxxx> wrote:
> 
>> ata_id_to_dma_mode() isn't quite generic.  The function is basically
>> privately implemented ata_id_xfermask() combined with hardcoded mode
>> printing and configuration which are specific to ata_generic.
> 
> I anticpiated other users. This seems a backward move - we end up
> exporting lots of low level detail into the drivers which should be none
> of their business.

Those functions need to be exported anyway for pata_amd and I think it's
natural to export them as xfer mode and mask handling is pretty
fundamental and having those helpers around is handy when implementing
LLD-specific mode selection.

ata_id_to_dma_mode() just seemed a bit too specific to me.  Sans
ata_id_xfermask() part, printing configured mode and using "DMA" when
there's no applicable DMA mode don't seem too useful as generic xfer
mode/mask helper.  I agree that the latter part of the function can be
factored tho (setting xfer_mode, shift and clearing PIO flag according
to determined xfer_mask).  But since ata_generic() is currently the only
user, factoring that part out seems an overkill.

Well, I guess this is a matter of taste after all.  How about letting
Jeff determine it?  I'm okay as long as generic ata_id_xfermask() is
used there.

Thanks.

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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux