On Thu, 30 Jul 2015 11:28:43 +0300
Dan Carpenter <dan.carpen...@oracle.com> wrote:

> On Thu, Jul 30, 2015 at 09:05:39AM +0200, Christian Gromm wrote:
> > On Wed, 29 Jul 2015 11:53:34 +0530
> > Sudip Mukherjee <sudipm.mukher...@gmail.com> wrote:
> > 
> > > On Tue, Jul 28, 2015 at 05:16:09PM +0200, Christian Gromm wrote:
> > > > This patch prevents snprintf from exceeding a given buffer size.
> > > > 
> > > > Reported-by: Dan Carpenter <dan.carpen...@oracle.com>
> > > > Signed-off-by: Christian Gromm <christian.gr...@microchip.com>
> > > > ---
> > > <snip>
> > > > -               snprintf(devnod_buf, PAGE_SIZE, "%s-%s", mdev, mdev_ch);
> > > > +               snprintf(devnod_buf, sizeof(devnod_buf), "%s-%s", mdev, 
> > > > mdev_ch);
> > > And this gives checkpatch warning for more than 80 char.
> > 
> > I know, but decided to keep it anyway for the sake of readabilty.
> > Thanks for pointing this out.
> 
> I sometimes go over 80 characters, but it's not a good idea to do that
> in staging.  Someone is just going to send a follow on patch which adds
> a line break.  It takes too much energy to reject those patches.

Thanks for the hint. Appreciate that.

regards,
Chris

> 
> regards,
> dan carpenter
> 

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to