Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756036AbbGQHiv (ORCPT ); Fri, 17 Jul 2015 03:38:51 -0400 Received: from smtprelay0032.hostedemail.com ([216.40.44.32]:60254 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751300AbbGQHit (ORCPT ); Fri, 17 Jul 2015 03:38:49 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3872:3873:4250:4321:4605:5007:6261:6691:7875:7904:8784:10004:10400:10848:11026:11473:11657:11658:11914:12043:12296:12517:12519:12740:13138:13231:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: man78_69224bc20cb21 X-Filterd-Recvd-Size: 3895 Message-ID: <1437118721.2495.54.camel@perches.com> Subject: Re: [PATCH] sm750fb: coding style fixes lines over 80 chars From: Joe Perches To: Vinay Simha BN Cc: Sudip Mukherjee , Teddy Wang , Greg Kroah-Hartman , "open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER" , "open list:STAGING SUBSYSTEM" , open list Date: Fri, 17 Jul 2015 00:38:41 -0700 In-Reply-To: <1437118085-8432-1-git-send-email-simhavcs@gmail.com> References: <1437118085-8432-1-git-send-email-simhavcs@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2993 Lines: 65 On Fri, 2015-07-17 at 12:58 +0530, Vinay Simha BN wrote: > scripts/checkpatch.pl kernel coding style fixes of WARNING Please use checkpatch's --strict option until you know kernel style much better. > diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h [] > @@ -259,17 +259,22 @@ unsigned int height, /* width and height of rectangle in pixel value */ > unsigned int rop2); > > int hw_imageblit(struct lynx_accel *accel, > - const char *pSrcbuf, /* pointer to start of source buffer in system memory */ > - u32 srcDelta, /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */ > - u32 startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */ > - u32 dBase, /* Address of destination: offset in frame buffer */ > + const char *pSrcbuf, /* pointer to start of source > + buffer in system memory */ If you change these lines, please use normal kernel comment style. /* * comment block */ > diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h [] > @@ -49,17 +49,23 @@ > /* Field Macros */ > #define FIELD_START(field) (0 ? field) > #define FIELD_END(field) (1 ? field) Odd statements. > -#define FIELD_SIZE(field) (1 + FIELD_END(field) - FIELD_START(field)) > -#define FIELD_MASK(field) (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field)) > -#define FIELD_NORMALIZE(reg, field) (((reg) & FIELD_MASK(field)) >> FIELD_START(field)) > -#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field)) > +#define FIELD_SIZE(field) (1 + FIELD_END(field) - \ > + FIELD_START(field)) > +#define FIELD_MASK(field) (((1 << (FIELD_SIZE(field)-1)) \ > + | ((1 << (FIELD_SIZE(field)-1)) - 1)) \ > + << FIELD_START(field)) > +#define FIELD_NORMALIZE(reg, field) (((reg) & FIELD_MASK(field)) >> \ > + FIELD_START(field)) > +#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \ > + FIELD_MASK(field)) > > #define FIELD_INIT(reg, field, value) FIELD_DENORMALIZE(reg ## _ ## field, \ > - reg ## _ ## field ## _ ## value) > + reg ## _ ## field ## _ ## value) > #define FIELD_INIT_VAL(reg, field, value) \ > (FIELD_DENORMALIZE(reg ## _ ## field, value)) > #define FIELD_VAL_SET(x, r, f, v) x = x & ~FIELD_MASK(r ## _ ## f) \ > - | FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v) > + | FIELD_DENORMALIZE(r ## _ ## f, \ > + r ## _ ## f ## _ ## v) I think _none_ of these are actually used so it'd be better to delete them instead. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/