Re: [PATCH v2] staging: greybus: log: Fix line over 80 characters.

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

 



Hello,

On Wed, Jan 04, 2017 at 04:26:35PM +0100, Johan Hovold wrote:
> On Wed, Jan 04, 2017 at 04:14:45PM +0100, Emmanuil Chatzipetru wrote:
> > Fix coding style issue caught by checkpatch.pl related to the following
> > warning:
> > 	- CHECK: WARNING: line over 80 characters
> 
> This commit message should be expanded to explain how this is done (e.g.
> "by dropping a redundant cast") which may not be obvious in this case.
> 
> > While at it, drop the redundant cast in the comparison.
> 
> This is now also needed to maintain consistency.
> 
> > Signed-off-by: Emmanuil Chatzipetru <chatzi.emanuel@xxxxxxxxx>
> > ---
> > v2: - As Johan suggested, is better to keep the already two-tab indendation
> > to be persisent.  Therefore, the 80 line characters limit is fixed by removing
> > the cast and use "%zu" for format specifier, to remove compiler warnings.
> >     - Moreover, the cast in the comparison is redundant and thus, removed.
> 
> When updating a single patch in a series you should resend the whole
> series (all with an increased version indicated by the subject prefix).
> 
> If you resend both patches, they should now be at v3 for example.

I will update the commit message of the second patch accordingly and resend
the v3 of both patches.

> 
> >  drivers/staging/greybus/log.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/staging/greybus/log.c b/drivers/staging/greybus/log.c
> > index 1a18ab1ff8aa..5c5bedaf69a6 100644
> > --- a/drivers/staging/greybus/log.c
> > +++ b/drivers/staging/greybus/log.c
> > @@ -37,9 +37,9 @@ static int gb_log_request_handler(struct gb_operation *op)
> >  	}
> >  	receive = op->request->payload;
> >  	len = le16_to_cpu(receive->len);
> > -	if (len != (int)(op->request->payload_size - sizeof(*receive))) {
> > -		dev_err(dev, "log request wrong size %d vs %d\n", len,
> > -				(int)(op->request->payload_size - sizeof(*receive)));
> > +	if (len != (op->request->payload_size - sizeof(*receive))) {
> > +		dev_err(dev, "log request wrong size %d vs %zu\n", len,
> > +				(op->request->payload_size - sizeof(*receive)));
> >  		return -EINVAL;
> >  	}
> >  	if (len == 0) {
> 
> Thanks,
> Johan

Thanks,
Emmanuil
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-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