From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0974C433EF for ; Mon, 28 Mar 2022 05:59:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238205AbiC1GAs (ORCPT ); Mon, 28 Mar 2022 02:00:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232187AbiC1GAq (ORCPT ); Mon, 28 Mar 2022 02:00:46 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 272473A1AD for ; Sun, 27 Mar 2022 22:59:06 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 22S5waqR101777; Mon, 28 Mar 2022 00:58:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1648447116; bh=euNlWAypupzll6zTo6HeCm5If8Iz+1ErlvmrRLwWpiA=; h=Date:Subject:To:References:From:In-Reply-To; b=go1XAFxTtnSKiPog5qs7z5iCoQOdI8omvrHINTV1ixIfMv6a9wCw0pLS82ihGQCuU OpvZDijxpfC7LYD+P1pCg9OZ+6w93q7vuyUVsNehq7FDQ/pRDj4IImoU9l6sLVBfLf aU69lpXzB8P3xNB3wAXSYZHwkP2IUWKdvNNO512M= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 22S5waAJ107661 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 28 Mar 2022 00:58:36 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Mon, 28 Mar 2022 00:58:36 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Mon, 28 Mar 2022 00:58:36 -0500 Received: from [172.24.222.171] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 22S5wU3l106927; Mon, 28 Mar 2022 00:58:31 -0500 Message-ID: <9a20ed24-be9d-bbec-19da-56c0ff68cbda@ti.com> Date: Mon, 28 Mar 2022 11:28:30 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] mtd: spi-nor: fix minmax.cocci warnings Content-Language: en-US To: Julia Lawall , , , Amit Kumar Mahapatra , Michal Simek , Tudor Ambarus , Michael Walle , Pratyush Yadav , Miquel Raynal , Richard Weinberger , , References: From: Vignesh Raghavendra In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi. On 26/03/22 2:00 pm, Julia Lawall wrote: > From: kernel test robot > > Use min to simplify the code. > > Generated by: scripts/coccinelle/misc/minmax.cocci > > Fixes: 2747bc2106aa ("mtd: spi-nor: Add dual parallel and stacked mode support") > CC: Amit Kumar Mahapatra > Reported-by: kernel test robot > Signed-off-by: kernel test robot > Signed-off-by: Julia Lawall > --- > > tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS > head: 1870e0fa79a9d58c6748c34550f3ccea0b515933 > commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support > :::::: branch date: 34 hours ago > :::::: commit date: 8 weeks ago > > drivers/mtd/spi-nor/core.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > --- a/drivers/mtd/spi-nor/core.c > +++ b/drivers/mtd/spi-nor/core.c > @@ -2034,10 +2034,7 @@ static int spi_nor_read(struct mtd_info > (offset << nor->shift); > } > } > - if (len < rem_bank_len) > - read_len = len; > - else > - read_len = rem_bank_len; > + read_len = min(len, rem_bank_len); This chunk does not exist in mainline. Seems like xlnx local changes. Regards Vignesh