linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grosjean Stephane <s.grosjean@peak-system.com>
To: Sebastian Haas <dev@sebastianhaas.info>
Cc: Linux-can Mailing List <linux-can@vger.kernel.org>
Subject: Re: [PATCH] Add PEAK System USB adapters core driver
Date: Fri, 23 Dec 2011 10:33:48 +0100	[thread overview]
Message-ID: <4EF44AFC.60400@peak-system.com> (raw)
In-Reply-To: <4EF3A40E.4080206@sebastianhaas.info>

Hi Sebastian,

Le 22/12/2011 22:41, Sebastian Haas a écrit :
> Hi again,
>
> some nitpicking this time. ;-)
>
... I certainly agree with you! But it's good news anyway.

Generally speaking:

- ok for the two missing ending \n
- ok for strncpy instead of strcpy()
- but what about the followings?

> +    struct can_bittiming *bt =&dev->can.bittiming;
                                  ^^^ remove whitespace
...

> +    if (sizeof_candev<  sizeof(struct peak_usb_device))
                         ^^^^^^ cleanup

...

> +    netdev->netdev_ops =&peak_usb_netdev_ops;
                            ^^^^ whitespace
...

>> +
>> +    SET_NETDEV_DEV(netdev,&intf->dev);
>                              ^^^
>> +
>> +        dev->state&= ~PCAN_USB_STATE_CONNECTED;
>                          ^^^^
>> +            if (*pc<  32 || *pc>  127)
>                               ^^^^         ^^
It looks like missing whitespaces sometimes, and sometimes there were 
too in your text... which is different from the patch I sent yesterday. 
Or do I misunderstand your comments?

>> +
>> +    /* Last chance do send some synchronous commands here */
>> +    err = driver_for_each_device(&peak_usb_driver.drvwrap.driver, NULL,
>> +        NULL, peak_usb_do_device_exit);
>> +    if (err)
>> +        err = 0;
> \err\ is neither checked nor printed, why not removing it?
>

Because of that (see <linux/device.h>):

extern int __must_check driver_for_each_device(struct device_driver *drv,
            ~~~~~~~~~~~~

... Is there any other way to get around that?

> You are mixing pr_*, dev_* and netdev_* please check if it is possible 
> to harmonize the usage.
>
Ok I'll try do that, whenever it is possible.

> Cheers,
>  Sebastian +

Thanks and regards,

Stéphane

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

  reply	other threads:[~2011-12-23  9:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22 13:11 [PATCH] Add PEAK System USB adapters core driver Stephane Grosjean
2011-12-22 21:41 ` Sebastian Haas
2011-12-23  9:33   ` Grosjean Stephane [this message]
2011-12-23 11:48     ` dev
2012-01-10 12:53   ` Marc Kleine-Budde
2012-01-10 10:17 ` Wolfgang Grandegger
2012-01-10 15:22   ` Oliver Hartkopp
2012-01-10 15:35     ` Wolfgang Grandegger
2012-01-11  9:23       ` Grosjean Stephane
2012-01-11  9:50         ` Marc Kleine-Budde
2012-01-11 10:09           ` Grosjean Stephane
2012-01-11 10:12           ` Wolfgang Grandegger
2012-01-11 10:29             ` Oliver Hartkopp
2012-01-11 12:28               ` Wolfgang Grandegger
2012-01-11  9:59         ` Wolfgang Grandegger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EF44AFC.60400@peak-system.com \
    --to=s.grosjean@peak-system.com \
    --cc=dev@sebastianhaas.info \
    --cc=linux-can@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).