Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3184732imm; Sun, 1 Jul 2018 14:40:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJoStJQIOpCuDQqOfykv2/P+tHT+5DNJi5YGeMstA2lNnGAfU/UbCzGZ+iG0uHNXAI2jGTT X-Received: by 2002:a17:902:22:: with SMTP id 31-v6mr23649110pla.332.1530481217982; Sun, 01 Jul 2018 14:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530481217; cv=none; d=google.com; s=arc-20160816; b=sKn6ddQV6k2h9Lx7pZTPUFZcxu4T1a5nclCmyYtSNywKgg+dY4LnFyq7tsE7c7IOie hOPZMu5BWUKV+tHL9Ww7mO2fr9DIpo3tA2BoIhZuE0mT7Av2ju52AH4ye21KpbCUsSU3 ATwBqcI/3d1bTnIY22laBBARIkK8uhCHSPQONUPwrCQ/7dbB4B1cOvXTOOTRy/Tams85 bJd0mKRqDaWsvMdH2seyKZ6MSFhY7jvV/5B6n+zGalRvUEa7bqLTWc0mELeKHI7Fs7yk 5W13mnDlud1r2nivbJX5I1PDFBa3nI9hIMW2HRhJlyGV0Lcezmu3ASw1fHP75ig5v0TQ egnw== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=hs580eGKqID+NbiQmHTUhVTlhDsHXdaHlUQGx3sg2Tc=; b=ndO8L7UhQWVcttSbrTRV3pJCQsjdvrF5ny4WqqS5XuOLILEf0NnbQkXWqpEc3cl21q iSY10FDp6PoZ3ShW3jsfEWSn9JVQZwyW0APMtyhXZVuKp3fwPkUSkZmm6WS7sQoMVQ0j z+uhm+Jydls8wCZcWDgTEWpmLcxKgrjikle2omeaqkv7USOHLrHqoL9O1VtUxdHHcyZc Xh0+PUDsqcCVNenvu/u2tBheiyKHbsNhW3ZCq9bEkI4S+Nec+anPRWI5w2pocm+9RVi9 c3TXWrKR8Uj2k6JyFYcuOBlVWlVphoWZeyn2JuoMxOp353sQ1odrgFNAWrNFLY9+TxIS lTSg== 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 r9-v6si12489726pgp.591.2018.07.01.14.40.01; Sun, 01 Jul 2018 14:40:17 -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 S1752547AbeGAVjW (ORCPT + 99 others); Sun, 1 Jul 2018 17:39:22 -0400 Received: from smtprelay0216.hostedemail.com ([216.40.44.216]:56307 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752495AbeGAVjV (ORCPT ); Sun, 1 Jul 2018 17:39:21 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id B9CC918045E87; Sun, 1 Jul 2018 21:39:20 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:2911:3138:3139:3140:3141:3142:3167:3355:3622:3865:3866:3867:3868:3870:3871:3872:3874:4250:4321:4425:4605:5007:6119:6120:7550:7901:7974:9389:10004:10400:10848:10967:11026:11232:11473:11658:11914:12296:12438:12679:12740:12760:12895:13180:13229:13439:14096:14097:14181:14659:14721:21080:21433:21451:21627:30012:30054:30070:30090:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: cave43_172a3ed53ef0d X-Filterd-Recvd-Size: 3519 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA; Sun, 1 Jul 2018 21:39:19 +0000 (UTC) Message-ID: <6d3fb517adb8880d9f7642d185405590dc9f7e83.camel@perches.com> Subject: Re: [PATCH v3 2/2] ubi: expose the volume CRC check skip flag From: Joe Perches To: Richard Weinberger Cc: Boris Brezillon , Quentin Schulz , dedekind1@gmail.com, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com Date: Sun, 01 Jul 2018 14:39:17 -0700 In-Reply-To: <2098416.O8QMNZQyoz@blindfold> References: <20180701223347.2cef133b@bbrezillon> <2098416.O8QMNZQyoz@blindfold> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2018-07-01 at 23:01 +0200, Richard Weinberger wrote: > Am Sonntag, 1. Juli 2018, 22:54:32 CEST schrieb Joe Perches: > > On Sun, 2018-07-01 at 22:33 +0200, Boris Brezillon wrote: > > > On Sun, 01 Jul 2018 21:35:57 +0200 Richard Weinberger wrote: > > > > Am Donnerstag, 28. Juni 2018, 09:40:53 CEST schrieb Quentin Schulz: > > > > > Now that we have the logic for skipping CRC check for static UBI volumes > > > > > in the core, let's expose it to users. > > [] > > > > > diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c > > [] > > > > > @@ -622,6 +622,10 @@ static int verify_mkvol_req(const struct ubi_device *ubi, > > > > > req->vol_type != UBI_STATIC_VOLUME) > > > > > goto bad; > > > > > > > > > > + if (req->flags & UBI_VOL_SKIP_CRC_CHECK_FLG && > > > > > > Oops, missed that req->flags & UBI_VOL_SKIP_CRC_CHECK_FLG check was > > > missing parens (checkpatch --strict should complain about that). > > > > Why should checkpatch complain? > > & has higher precedence than &&. > > The code is more readable. IYO. checkpatch doesn't care and I think it's unnecessary. Just fyi: checkpatch does suggest parenthesis removal with --strict when using == or != with && or || e.g.: $ cat -n foo.c 1 bool function(void) 2 { 3 if (foo & 1 && bar & 2) 4 return true; 5 if ((foo & 1) && (bar && 2)) 6 return true; 7 if (foo == 1 && bar != 2) 8 return true; 9 if ((foo == 1) && (bar != 2)) 10 return true; 11 return false; 12 } $ ./scripts/checkpatch.pl -f --strict foo.c WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: foo.c:1: +bool function(void) CHECK: Unnecessary parentheses around 'foo == 1' #9: FILE: foo.c:9: + if ((foo == 1) && (bar != 2)) CHECK: Unnecessary parentheses around 'bar != 2' #9: FILE: foo.c:9: + if ((foo == 1) && (bar != 2)) total: 0 errors, 1 warnings, 2 checks, 12 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. foo.c has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.