Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1286708

Re: [PATCH 1/3] regmap: cache: Tidy up the code to suppress style check warnings

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] regmap: cache: Tidy up the code to suppress style check warnings
Date 2015-12-08 18:20 +0100
Message-ID <qDu5H-5d4-9@gated-at.bofh.it> (permalink)
References <qBywO-38I-27@gated-at.bofh.it> <qByGt-3cm-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thu, Dec 03, 2015 at 05:31:51PM +0800, Xiubo Li wrote:

> There will be some warning like the following when checking new
> patches near this code:
>     "WARNING: Missing a blank line after declarations"
> This patch will suppress this warning.

>  	switch (map->cache_word_size) {
> -	case 1: {
> -		u8 *cache = base;
> -		cache[idx] = val;
> +	case 1:
> +		((u8 *)base)[idx] = val;
>  		break;
> -	}

If there's a change to shut checkpatch up I'd rather just add the blank
line it's asking for - the code is the way it is currently to avoid the
casts since they're hard for people to read.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] regmap: cache: Tidy up the code to suppress style check warnings Xiubo Li <lixiubo@cmss.chinamobile.com> - 2015-12-03 10:50 +0100
  Re: [PATCH 1/3] regmap: cache: Tidy up the code to suppress style  check warnings Mark Brown <broonie@kernel.org> - 2015-12-08 18:20 +0100
    Re: [PATCH 1/3] regmap: cache: Tidy up the code to suppress stylecheck  warnings Xiubo Li <lixiubo@cmss.chinamobile.com> - 2015-12-09 04:40 +0100

csiph-web