Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp220288imm; Fri, 7 Sep 2018 20:32:19 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZnYyVroaNiVmvnKRSzO56EUsBfRUvipKc7az5TjfL8ZLk2mVQBU+1cub1KF7iTjJpol0uV X-Received: by 2002:a65:6654:: with SMTP id z20-v6mr5285265pgv.186.1536377539364; Fri, 07 Sep 2018 20:32:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536377539; cv=none; d=google.com; s=arc-20160816; b=uBFtjUzmd9G1FrSdoxEjM1WB9YN9o9SeNRbSgxLNQeWNbIdQsb+QMt9hxqwiqxtEG1 4rXtZ5iMIhykHsNN07xBGbAFV4RSn7VRP0oNmwACRtNI2od7VX7Cs6WFnNS4OFiDQ63W 1lKCsvcy5CcxQf1jcQvuxwxTimI/dMpKHVIzqbhj5OYI6UhV2Dd9EZv0znGGnsOeQ3Oo JnhKeceIv08xpkiznMv+62YcnNJIYlzby2vq5ZeW0tV51U4wj0ZOXbxY2iFNbJzNaacl 8nzPh/Zp53I6cE+zlRja6UmMhbz2zTPkHeuhU9gXJuF7ymoriYl0dD3m6cNd38gd8dLa k7Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=us0od6sww2gG6ye2NdELlPgjO9LLRzB7QtLhrlVU4Uw=; b=iz4ZrJw68tQ3fgUmDG/tvkOL33g4pqeMW9xY3rL2d6OYhJTpV2XXxoItVcL23UoYEz 7fSljNa44o2V2SzdFIa/0yghv1umYPLFzJV8A5SqyMLRiN9A3KZg59zcQ/MvOjW4YmRW h/aNgB9g8ugPFb+/zXuGsxoXwqMcFR5Hjmpe4M9ZqieJqdJ1SFugOsES9jaf40ScbMIf +yllNe+TK4vhvvibSzSB/DAp5y8f+2MGaCkz2kSnNyni1TyNm7h25ARTzeICsOCI/0eU jLQZJvGsCV2NRwsH3pEJtd9c/+xZf67DnBffSxSyj3gSA7zOCIYPA7CEFpLzjPWcOarp bczg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1-v6si10735253pli.497.2018.09.07.20.31.33; Fri, 07 Sep 2018 20:32:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726343AbeIHIMn (ORCPT + 99 others); Sat, 8 Sep 2018 04:12:43 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:11672 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726175AbeIHIMm (ORCPT ); Sat, 8 Sep 2018 04:12:42 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 8860B4D0F4607; Sat, 8 Sep 2018 11:28:36 +0800 (CST) Received: from [10.151.23.176] (10.151.23.176) by smtp.huawei.com (10.3.19.203) with Microsoft SMTP Server (TLS) id 14.3.399.0; Sat, 8 Sep 2018 11:28:31 +0800 Subject: Re: [PATCH v2] staging: erofs: use explicit unsigned int type To: =?UTF-8?Q?Thomas_Wei=c3=9fschuh?= References: <20180830205605.19492-1-linux@weissschuh.net> <20180907163912.3686-1-linux@weissschuh.net> CC: Chao Yu , Greg Kroah-Hartman , , , From: Gao Xiang Message-ID: <5c44a63b-041d-1fce-0748-53c0b44f5983@huawei.com> Date: Sat, 8 Sep 2018 11:28:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180907163912.3686-1-linux@weissschuh.net> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.151.23.176] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, Thanks for your new patch. It seems that this patch also introduces 2 new 'WARNING: line over 80 characters', could you please fix it in the patch? On 2018/9/8 0:39, Thomas Weißschuh wrote: > Changes since v1: > > * Removed changes that conflicted with > [PATCH 1/6] staging: erofs: formatting fix in unzip_vle_lz4.c > * Added patch description > > -- >8 -- > > Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" > detected by checkpatch.pl > > Signed-off-by: Thomas Weißschuh > > --- > drivers/staging/erofs/data.c | 4 +-- > drivers/staging/erofs/dir.c | 14 ++++----- > drivers/staging/erofs/inode.c | 6 ++-- > drivers/staging/erofs/namei.c | 28 +++++++++--------- > drivers/staging/erofs/super.c | 2 +- > drivers/staging/erofs/unzip_vle.c | 48 +++++++++++++++---------------- > drivers/staging/erofs/utils.c | 2 +- > drivers/staging/erofs/xattr.c | 40 +++++++++++++------------- > 8 files changed, 72 insertions(+), 72 deletions(-) > > diff --git a/drivers/staging/erofs/data.c b/drivers/staging/erofs/data.c > index 3c0d9159514e..e1916101ad75 100644 > --- a/drivers/staging/erofs/data.c > +++ b/drivers/staging/erofs/data.c > @@ -202,7 +202,7 @@ static inline struct bio *erofs_read_raw_page( > struct address_space *mapping, > struct page *page, > erofs_off_t *last_block, > - unsigned nblocks, > + unsigned int nblocks, > bool ra) > { > struct inode *inode = mapping->host; > @@ -236,7 +236,7 @@ static inline struct bio *erofs_read_raw_page( > .m_la = blknr_to_addr(current_block), > }; > erofs_blk_t blknr; > - unsigned blkoff; > + unsigned int blkoff; > > err = erofs_map_blocks(inode, &map, EROFS_GET_BLOCKS_RAW); > if (unlikely(err)) > diff --git a/drivers/staging/erofs/dir.c b/drivers/staging/erofs/dir.c > index be6ae3b1bdbe..87f12b0f983f 100644 > --- a/drivers/staging/erofs/dir.c > +++ b/drivers/staging/erofs/dir.c > @@ -24,8 +24,8 @@ static const unsigned char erofs_filetype_table[EROFS_FT_MAX] = { > }; > > static int erofs_fill_dentries(struct dir_context *ctx, > - void *dentry_blk, unsigned *ofs, > - unsigned nameoff, unsigned maxsize) > + void *dentry_blk, unsigned int *ofs, > + unsigned int nameoff, unsigned int maxsize) > { > struct erofs_dirent *de = dentry_blk; > const struct erofs_dirent *end = dentry_blk + nameoff; > @@ -36,7 +36,7 @@ static int erofs_fill_dentries(struct dir_context *ctx, > int de_namelen; > unsigned char d_type; > #ifdef CONFIG_EROFS_FS_DEBUG > - unsigned dbg_namelen; > + unsigned int dbg_namelen; > unsigned char dbg_namebuf[EROFS_NAME_LEN]; > #endif > > @@ -81,15 +81,15 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) > struct inode *dir = file_inode(f); > struct address_space *mapping = dir->i_mapping; > const size_t dirsize = i_size_read(dir); > - unsigned i = ctx->pos / EROFS_BLKSIZ; > - unsigned ofs = ctx->pos % EROFS_BLKSIZ; > + unsigned int i = ctx->pos / EROFS_BLKSIZ; > + unsigned int ofs = ctx->pos % EROFS_BLKSIZ; > int err = 0; > bool initial = true; > > while (ctx->pos < dirsize) { > struct page *dentry_page; > struct erofs_dirent *de; > - unsigned nameoff, maxsize; > + unsigned int nameoff, maxsize; > > dentry_page = read_mapping_page(mapping, i, NULL); > if (IS_ERR(dentry_page)) > @@ -109,7 +109,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) > goto skip_this; > } > > - maxsize = min_t(unsigned, dirsize - ctx->pos + ofs, PAGE_SIZE); > + maxsize = min_t(unsigned int, dirsize - ctx->pos + ofs, PAGE_SIZE); WARNING: line over 80 characters #102: FILE: drivers/staging/erofs/dir.c:112: + maxsize = min_t(unsigned int, dirsize - ctx->pos + ofs, PAGE_SIZE); > > /* search dirents at the arbitrary position */ > if (unlikely(initial)) { > diff --git a/drivers/staging/erofs/inode.c b/drivers/staging/erofs/inode.c > index fbf6ff25cd1b..70d34b0a97fe 100644 > --- a/drivers/staging/erofs/inode.c > +++ b/drivers/staging/erofs/inode.c > @@ -19,7 +19,7 @@ static int read_inode(struct inode *inode, void *data) > { > struct erofs_vnode *vi = EROFS_V(inode); > struct erofs_inode_v1 *v1 = data; > - const unsigned advise = le16_to_cpu(v1->i_advise); > + const unsigned int advise = le16_to_cpu(v1->i_advise); > > vi->data_mapping_mode = __inode_data_mapping(advise); > > @@ -112,7 +112,7 @@ static int read_inode(struct inode *inode, void *data) > * try_lock since it takes no much overhead and > * will success immediately. > */ > -static int fill_inline_data(struct inode *inode, void *data, unsigned m_pofs) > +static int fill_inline_data(struct inode *inode, void *data, unsigned int m_pofs) WARNING: line over 80 characters #124: FILE: drivers/staging/erofs/inode.c:115: +static int fill_inline_data(struct inode *inode, void *data, unsigned int m_pofs) Thanks, Gao Xiang