Re: [PATCH v2] staging: comedi: adv_pci_dio: restore PCI-1753E support

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

 



On 2013-03-15 17:48, H Hartley Sweeten wrote:
On Friday, March 15, 2013 10:44 AM, Ian Abbott wrote:
On 2013-03-15 17:06, H Hartley Sweeten wrote:
On Friday, March 15, 2013 3:32 AM, Ian Abbott wrote:
+	if (pci_request_region(pcidev, PCIDIO_MAINREG, "adv_pci_dio") == 0) {

Nitpick, is there any way to get the pci_driver name here instead of the
open coded string?

Sure, we could use `adv_pci_dio_pci_driver.name` (except it hasn't been
declared yet at that point), or `pcidev->driver->name`.  It's only used
transiently though, so it doesn't matter much what string we use.

Like I said, it's just a pitpick.

I still would use pdidev->driver->name instead of the open coded string.
It saves a couple bytes and if the driver name ever changes they would
still match. Call it a pet peeve of mine... ;-)

I don't know if it uses more or fewer bytes (loading an immediate address versus a couple of indirect indexed references) although the difference wouldn't be much. The compiler should optimize identical string literals to share the same storage.

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux