Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1743691imm; Sun, 9 Sep 2018 08:18:10 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ3g0Qa5k5/7qWeO6ZAbbyLryA2qRRkgl9PC3jpK3kWTqOqqhpB3CFyxCgZ9q9TBZASIUy4 X-Received: by 2002:a63:6c89:: with SMTP id h131-v6mr17887177pgc.237.1536506290265; Sun, 09 Sep 2018 08:18:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536506290; cv=none; d=google.com; s=arc-20160816; b=cW01Yw1arNU1gqgCJFH/cpUblF+68WAkS2N2hhErfIkwZXFRq/JBp2Xm2ATte9hkUL q0racUDbsU3BuSv/5NQ7SgWQ16tjqGXulys+0cqabNP9ShyZF3frUVjbRCPaVqTvIDcR DlLtho3/AK5IdkzGvFKkI+/6pXobyK3Cyx1sDJKIxkEKR52FzPJgUHjnASUwxUv66IpR PZrRMvB1nOUGJeUUS+bFA0NHSQHH/xwHOFLBwuvL3CqGFzIo6n3nVlbUtamQaGdwpcZe NzS9aOxP6xZbhkh2M/F+ExwZeG02+J/CdSC4D1k0Qw4XY1Ss9Lpmf8OuvUyxYvWlnv0t 3nfw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=lTvnZLJOkwOeHMTYyRnt/xUBgwFUdmtcrUXCWbNmjBI=; b=OidbWRo8JXaSmP+r/O6eMSAF7di1Z5E79e1F/iHPbzd3722V198nuxo/RVZ0Sz+hYR wpx+IgSDjtJ+C0C/jOviU9ZVoeATXPajf/f+C32KGrP7RaVc8C8ehu1FAKKL/0BQbeV/ u2ky93+TX4+YmMhXOIv9Xz7FW4ze2a6wUXtyxxIpSW5VzUF7bU8pgW84+7O7J19ENthm 7oK5MQfDBDgfk0TckU2ag9Br7Td2upAW6vIRlXgZL0g94SrTrsEdahktbpqZHGcZ0y9J axzg2nRzHY+KMSjqUNXKGXfUDorvAYFxyj06T3KJxgmtMWwcaJqsx+xddtZjOehxmK/f 5yOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w9HaahVa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8-v6si15615533pli.14.2018.09.09.08.17.54; Sun, 09 Sep 2018 08:18:10 -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; dkim=pass header.i=@kernel.org header.s=default header.b=w9HaahVa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727659AbeIIUGf (ORCPT + 99 others); Sun, 9 Sep 2018 16:06:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:41602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726560AbeIIUGf (ORCPT ); Sun, 9 Sep 2018 16:06:35 -0400 Received: from [192.168.0.101] (unknown [49.77.179.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DA3BB20854; Sun, 9 Sep 2018 15:16:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536506195; bh=xQeLXlHtiY6SVf/ncPXzo1l9YtE8TnEryhPYuKn6LOw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=w9HaahVaEndoXHaMJEKpWsy5LuD2/fVQK2zAdrA5tLoRyNQ7ZeolLuFGHMjSp1uvx sEoP1pkiNuShDpb84Ju5SJ7K+SA9EC5TlnApwGogTzww2Rq6ljBzPBspUHw8p+VPV1 rSxRoUr9plXngg+IJYH86F6DVG4cJdos5xQtKi4w= Subject: Re: [PATCH v2] staging: erofs: use explicit unsigned int type To: Gao Xiang , =?UTF-8?Q?Thomas_Wei=c3=9fschuh?= Cc: devel@driverdev.osuosl.org, Greg Kroah-Hartman , linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20180830205605.19492-1-linux@weissschuh.net> <20180907163912.3686-1-linux@weissschuh.net> <5c44a63b-041d-1fce-0748-53c0b44f5983@huawei.com> From: Chao Yu Message-ID: <9f2c06f5-05db-a117-bb11-92c1ae517b09@kernel.org> Date: Sun, 9 Sep 2018 23:16:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <5c44a63b-041d-1fce-0748-53c0b44f5983@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On 2018/9/8 11:28, Gao Xiang wrote: > 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? It will be better to fix that. Some reviewed cleanup patches are merged before this patch, then I failed to add this one, so could you rebase on top of erofs dev branch in below link: https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs Thanks, > > 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 >