* [PATCH] drivers: staging: comedi: fix function prototypes
@ 2016-12-14 13:42 Piotr Gregor
2016-12-14 16:14 ` Hartley Sweeten
2016-12-15 11:44 ` Ian Abbott
0 siblings, 2 replies; 6+ messages in thread
From: Piotr Gregor @ 2016-12-14 13:42 UTC (permalink / raw)
To: abbotti; +Cc: hsweeten, gregkh, devel, linux-kernel
Add names of parameters to function prototypes in comedi PCI.
Checkpatch reports now no errors.
Signed-off-by: Piotr Gregor <piotrgregor@rsyncme.org>
---
drivers/staging/comedi/comedi_pci.h | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/comedi/comedi_pci.h b/drivers/staging/comedi/comedi_pci.h
index 4005cc9..7dfd892 100644
--- a/drivers/staging/comedi/comedi_pci.h
+++ b/drivers/staging/comedi/comedi_pci.h
@@ -34,18 +34,20 @@
#define PCI_VENDOR_ID_RTD 0x1435
#define PCI_VENDOR_ID_HUMUSOFT 0x186c
-struct pci_dev *comedi_to_pci_dev(struct comedi_device *);
+struct pci_dev *comedi_to_pci_dev(struct comedi_device *dev);
-int comedi_pci_enable(struct comedi_device *);
-void comedi_pci_disable(struct comedi_device *);
-void comedi_pci_detach(struct comedi_device *);
+int comedi_pci_enable(struct comedi_device *dev);
+void comedi_pci_disable(struct comedi_device *dev);
+void comedi_pci_detach(struct comedi_device *dev);
-int comedi_pci_auto_config(struct pci_dev *, struct comedi_driver *,
+int comedi_pci_auto_config(struct pci_dev *pcidev, struct comedi_driver *driver,
unsigned long context);
-void comedi_pci_auto_unconfig(struct pci_dev *);
+void comedi_pci_auto_unconfig(struct pci_dev *pcidev);
-int comedi_pci_driver_register(struct comedi_driver *, struct pci_driver *);
-void comedi_pci_driver_unregister(struct comedi_driver *, struct pci_driver *);
+int comedi_pci_driver_register(struct comedi_driver *comedi_driver,
+ struct pci_driver *pci_driver);
+void comedi_pci_driver_unregister(struct comedi_driver *comedi_driver,
+ struct pci_driver *pci_driver);
/**
* module_comedi_pci_driver() - Helper macro for registering a comedi PCI driver
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH] drivers: staging: comedi: fix function prototypes
2016-12-14 13:42 [PATCH] drivers: staging: comedi: fix function prototypes Piotr Gregor
@ 2016-12-14 16:14 ` Hartley Sweeten
2016-12-15 11:46 ` Ian Abbott
2016-12-15 11:44 ` Ian Abbott
1 sibling, 1 reply; 6+ messages in thread
From: Hartley Sweeten @ 2016-12-14 16:14 UTC (permalink / raw)
To: Piotr Gregor, abbotti; +Cc: gregkh, devel, linux-kernel
On December 14, 2016 6:42 AM, Piotr Gregor wrote:
> Add names of parameters to function prototypes in comedi PCI.
> Checkpatch reports now no errors.
>
> Signed-off-by: Piotr Gregor <piotrgregor@rsyncme.org>
> ---
> drivers/staging/comedi/comedi_pci.h | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/comedi/comedi_pci.h b/drivers/staging/comedi/comedi_pci.h
> index 4005cc9..7dfd892 100644
> --- a/drivers/staging/comedi/comedi_pci.h
> +++ b/drivers/staging/comedi/comedi_pci.h
> @@ -34,18 +34,20 @@
> #define PCI_VENDOR_ID_RTD 0x1435
> #define PCI_VENDOR_ID_HUMUSOFT 0x186c
>
> -struct pci_dev *comedi_to_pci_dev(struct comedi_device *);
> +struct pci_dev *comedi_to_pci_dev(struct comedi_device *dev);
For the function prototypes I prefer no names for the "pointer" parameters.
The "struct foo *" declaration is just as clear as "struct foo *bar".
Thanks,
Hartley
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: staging: comedi: fix function prototypes
2016-12-14 13:42 [PATCH] drivers: staging: comedi: fix function prototypes Piotr Gregor
2016-12-14 16:14 ` Hartley Sweeten
@ 2016-12-15 11:44 ` Ian Abbott
2016-12-15 17:36 ` Hartley Sweeten
1 sibling, 1 reply; 6+ messages in thread
From: Ian Abbott @ 2016-12-15 11:44 UTC (permalink / raw)
To: Piotr Gregor; +Cc: hsweeten, gregkh, devel, linux-kernel
On 14/12/16 13:42, Piotr Gregor wrote:
> Add names of parameters to function prototypes in comedi PCI.
> Checkpatch reports now no errors.
>
> Signed-off-by: Piotr Gregor <piotrgregor@rsyncme.org>
> ---
> drivers/staging/comedi/comedi_pci.h | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/comedi/comedi_pci.h b/drivers/staging/comedi/comedi_pci.h
> index 4005cc9..7dfd892 100644
> --- a/drivers/staging/comedi/comedi_pci.h
> +++ b/drivers/staging/comedi/comedi_pci.h
> @@ -34,18 +34,20 @@
> #define PCI_VENDOR_ID_RTD 0x1435
> #define PCI_VENDOR_ID_HUMUSOFT 0x186c
>
> -struct pci_dev *comedi_to_pci_dev(struct comedi_device *);
> +struct pci_dev *comedi_to_pci_dev(struct comedi_device *dev);
>
> -int comedi_pci_enable(struct comedi_device *);
> -void comedi_pci_disable(struct comedi_device *);
> -void comedi_pci_detach(struct comedi_device *);
> +int comedi_pci_enable(struct comedi_device *dev);
> +void comedi_pci_disable(struct comedi_device *dev);
> +void comedi_pci_detach(struct comedi_device *dev);
>
> -int comedi_pci_auto_config(struct pci_dev *, struct comedi_driver *,
> +int comedi_pci_auto_config(struct pci_dev *pcidev, struct comedi_driver *driver,
> unsigned long context);
> -void comedi_pci_auto_unconfig(struct pci_dev *);
> +void comedi_pci_auto_unconfig(struct pci_dev *pcidev);
>
> -int comedi_pci_driver_register(struct comedi_driver *, struct pci_driver *);
> -void comedi_pci_driver_unregister(struct comedi_driver *, struct pci_driver *);
> +int comedi_pci_driver_register(struct comedi_driver *comedi_driver,
> + struct pci_driver *pci_driver);
> +void comedi_pci_driver_unregister(struct comedi_driver *comedi_driver,
> + struct pci_driver *pci_driver);
>
> /**
> * module_comedi_pci_driver() - Helper macro for registering a comedi PCI driver
>
Looks good, thanks!
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: staging: comedi: fix function prototypes
2016-12-14 16:14 ` Hartley Sweeten
@ 2016-12-15 11:46 ` Ian Abbott
2016-12-15 16:12 ` Hartley Sweeten
0 siblings, 1 reply; 6+ messages in thread
From: Ian Abbott @ 2016-12-15 11:46 UTC (permalink / raw)
To: Hartley Sweeten, Piotr Gregor; +Cc: gregkh, devel, linux-kernel
On 14/12/16 16:14, Hartley Sweeten wrote:
> On December 14, 2016 6:42 AM, Piotr Gregor wrote:
>> Add names of parameters to function prototypes in comedi PCI.
>> Checkpatch reports now no errors.
>>
>> Signed-off-by: Piotr Gregor <piotrgregor@rsyncme.org>
>> ---
>> drivers/staging/comedi/comedi_pci.h | 18 ++++++++++--------
>> 1 file changed, 10 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/staging/comedi/comedi_pci.h b/drivers/staging/comedi/comedi_pci.h
>> index 4005cc9..7dfd892 100644
>> --- a/drivers/staging/comedi/comedi_pci.h
>> +++ b/drivers/staging/comedi/comedi_pci.h
>> @@ -34,18 +34,20 @@
>> #define PCI_VENDOR_ID_RTD 0x1435
>> #define PCI_VENDOR_ID_HUMUSOFT 0x186c
>>
>> -struct pci_dev *comedi_to_pci_dev(struct comedi_device *);
>> +struct pci_dev *comedi_to_pci_dev(struct comedi_device *dev);
>
> For the function prototypes I prefer no names for the "pointer" parameters.
>
> The "struct foo *" declaration is just as clear as "struct foo *bar".
Maybe, but checkpatch.pl doesn't agree (not since commit
ca0d8929e75ab1f860f61208d46955f280a1b05e anyway)!
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] drivers: staging: comedi: fix function prototypes
2016-12-15 11:46 ` Ian Abbott
@ 2016-12-15 16:12 ` Hartley Sweeten
0 siblings, 0 replies; 6+ messages in thread
From: Hartley Sweeten @ 2016-12-15 16:12 UTC (permalink / raw)
To: Ian Abbott, Piotr Gregor; +Cc: gregkh, devel, linux-kernel
On Thursday, December 15, 2016 4:47 AM, Ian Abbott wrote:
> On 14/12/16 16:14, Hartley Sweeten wrote:
>> On December 14, 2016 6:42 AM, Piotr Gregor wrote:
>>> -struct pci_dev *comedi_to_pci_dev(struct comedi_device *);
>>> +struct pci_dev *comedi_to_pci_dev(struct comedi_device *dev);
>>
>> For the function prototypes I prefer no names for the "pointer" parameters.
>>
>> The "struct foo *" declaration is just as clear as "struct foo *bar".
>
> Maybe, but checkpatch.pl doesn't agree (not since commit
> ca0d8929e75ab1f860f61208d46955f280a1b05e anyway)!
Hmm.. Missed seeing that one go in.
I still think it's silly to name struct pointers in function arguments.
Especially since that normally leads to stuff like 'struct foo *foo' where
the parameter name is the same as the struct name.
Void pointers and generic types are a different matter. Naming those
makes sense for clarity.
Oh well... Just my 2 cents...
Hartley
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] drivers: staging: comedi: fix function prototypes
2016-12-15 11:44 ` Ian Abbott
@ 2016-12-15 17:36 ` Hartley Sweeten
0 siblings, 0 replies; 6+ messages in thread
From: Hartley Sweeten @ 2016-12-15 17:36 UTC (permalink / raw)
To: Ian Abbott, Piotr Gregor; +Cc: gregkh, devel, linux-kernel
On Thursday, December 15, 2016 4:45 AM, Ian Abbott wrote:
> On 14/12/16 13:42, Piotr Gregor wrote:
>> Add names of parameters to function prototypes in comedi PCI.
>> Checkpatch reports now no errors.
>>
>> Signed-off-by: Piotr Gregor <piotrgregor@rsyncme.org>
>
> Looks good, thanks!
>
> Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-12-15 17:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14 13:42 [PATCH] drivers: staging: comedi: fix function prototypes Piotr Gregor
2016-12-14 16:14 ` Hartley Sweeten
2016-12-15 11:46 ` Ian Abbott
2016-12-15 16:12 ` Hartley Sweeten
2016-12-15 11:44 ` Ian Abbott
2016-12-15 17:36 ` Hartley Sweeten
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.