Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp15168lqh; Fri, 3 May 2024 11:49:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWFSxV+3/sUWZfi+14/PjJXWW3BVb69ZOyMFuqdo44r2l4J+3QtIDBtRBUS7rVk9ZGqBm0a6slzDuEXeQfwQMDiplXQpxeMxMt5S38Ozw== X-Google-Smtp-Source: AGHT+IFHbdZtw+GVc+xPW8dYG25dJz2k6lxWK4j45rLsykH4Fn/WP9LWYdEo1TRy1ZdO4lWeaNMA X-Received: by 2002:a05:6808:2908:b0:3c6:9c5:7b6 with SMTP id ev8-20020a056808290800b003c609c507b6mr3815642oib.23.1714762199690; Fri, 03 May 2024 11:49:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714762199; cv=pass; d=google.com; s=arc-20160816; b=QXAm69PsnzxcyqEdcx9nlXSfJAja2umfZSNm2wDQkbRd4sdjsTJJV4VnQAwnuS5lR9 YLgvC3NhsFouDSLK2mxc8pC6/KypSJ2P9WUEnvuu16sMGDaAqtx3qFdT940EihIlLHD5 0Kuv0iFsRJj8nnqe+lijU+As16TQr3KlxsvKmP1uxZB3LCy0dOZ9o/pyx2OWd2lPoYzp QT0n7H7AfAkFS4sQGMFd11MkrMYZjbMRGMSdVaaWigy7afLeEndB9/JHvZt5+spSgyYd nX3EeZgqnYri7EXJ8QA20OEXyNJYBW5USEm4eWVtP158eoYoV4Gn3yE79bHF0v8hz51S byAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=77hzGIyr9qM/bmZ3o2LLjXkvCbHgrrzMWUibQcn58ic=; fh=b334fehp29PbIs5HbpYrdrEX1plYnZQzsFb4cSODXO4=; b=KEHZiR4rf5fUDM/uRBQTghTKnL/sDQDyVZnd8mfO43hggsbTqDFWoHRdYGR4zhc5x0 I7Mnw0e0tBPno+XrHszK4UIi9EFg3KscWewDo/p1SwOXF6DLOcXo3Ai7reu3AwoNYe/m aN43WFPe/4n0p1SFPLXDAR/R38kGejvMZ/cjeLJmF+7621dYXcC1dBxgr9gLJCiqF5KI RZQ5jyOckM2pd1+HgUw2XLgyIaif02NXE4FuxTK5Jq0xOC49ZnStjTzKbTRx6KX8Dbh6 IR+I9Ki2pgxvLqel+dJtbdKhY0ncbrobj3TuWu/zD0MMhrWthUAJsFy37GiF/XvfzdNc e5yQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=pEVFslJO; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-168085-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jf15-20020a0562142a4f00b006a0d2c22d98si3833771qvb.90.2024.05.03.11.49.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 11:49:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168085-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=pEVFslJO; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-168085-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6A0A81C2266D for ; Fri, 3 May 2024 18:49:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1AA0112F5A7; Fri, 3 May 2024 18:49:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="pEVFslJO" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 925C42E646 for ; Fri, 3 May 2024 18:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714762193; cv=none; b=Y70Wq6McKflVMwHAg2XaL0KnncXKwxva/nYesfamcmWZv742+UAXNOSbNept6RA44nTJrLSZWaX/LRqWFZW8QCkEbXcFy+ie6mKN70M+tM0c/AraHEIPN6IZpnvu7tW19j9BAHTWKVcHVOrK0MCrbdYy7n1jrfQT6lq0vPwVZa8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714762193; c=relaxed/simple; bh=yGw40/sPrzRGZYXQ4KjFa8YDK/5S6JDFw6lfLNvowjY=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=fDZtGp00tpv7r62VMu1mqlAcmddPbkc2bviWCery1MCsUlXIHbHDhhSMjhoJGxlqvgh/dYyEvoT2ge6UQAwvOhy1twCs0ypCSIxvkCmbvjkLY3IKXxu4pbwq9Yx52xgozfUNutfTWJFaLjoqDheRwODrtqqHQ7dvjS6SZzoYzB8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=pEVFslJO; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 443Hj0Yp014003; Fri, 3 May 2024 18:49:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=77hzGIyr9qM/bmZ3o2LLjXkvCbHgrrzMWUibQcn58ic=; b=pE VFslJOGHpZ/L09Q5397B+RLy7ZXdX2CbKtrxxLr+dYBSQVL7iF8DxCAvuulu76po hQaZhSRKYyH5ZJkDrzL0ijjkFPuGh1tYyqc6fuxHDL3ti+PpbAAytxoVLKVO24Q9 smPpKrlZAwuWDo5Y3srOr6hqgOUD98h+ne10DvW9uqd4ryTzrtdlwFZsXZZTC/0+ NYhGKyBRYJNd7rRYRYwgpnD71XaX2cqY3qCpMgkOk/leUqTm7t0p1h1P197c/7N6 nT1gZJoYJo47d4VG8t6JxgC7Lp9NPHNlxe1/opG8FCGQgwqjRWzMsvKjSEccTii3 nuLQK9xGPBiu91xV3rag== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xw2nc8d2y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 May 2024 18:49:39 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 443InRNW019967 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 3 May 2024 18:49:27 GMT Received: from [10.110.94.246] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 3 May 2024 11:49:26 -0700 Message-ID: <3a0edfd7-fa22-434a-902d-a3a0df1c9d0f@quicinc.com> Date: Fri, 3 May 2024 11:49:25 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 1/1] mtd: cfi: Get rid of redundant 'else' Content-Language: en-US To: Andy Shevchenko , , CC: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra References: <20240503184230.2927283-1-andriy.shevchenko@linux.intel.com> From: Jeff Johnson In-Reply-To: <20240503184230.2927283-1-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: Sxuo-uLUCjxAOsviM6ODP59QscNBSQ_G X-Proofpoint-GUID: Sxuo-uLUCjxAOsviM6ODP59QscNBSQ_G X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-03_13,2024-05-03_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 impostorscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 bulkscore=0 clxscore=1011 lowpriorityscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2405030133 On 5/3/2024 11:42 AM, Andy Shevchenko wrote: > In the snippets like the following > > if (...) > return / goto / break / continue ...; > else > ... > > the 'else' is redundant. Get rid of it. > > Signed-off-by: Andy Shevchenko Reviewed-by: Jeff Johnson > --- > include/linux/mtd/cfi.h | 32 ++++++++++++++++---------------- > 1 file changed, 16 insertions(+), 16 deletions(-) > > diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h > index 947410faf9e2..35ca19ae21ae 100644 > --- a/include/linux/mtd/cfi.h > +++ b/include/linux/mtd/cfi.h > @@ -308,32 +308,32 @@ static inline uint8_t cfi_read_query(struct map_info *map, uint32_t addr) > { > map_word val = map_read(map, addr); > > - if (map_bankwidth_is_1(map)) { > + if (map_bankwidth_is_1(map)) > return val.x[0]; > - } else if (map_bankwidth_is_2(map)) { > + if (map_bankwidth_is_2(map)) > return cfi16_to_cpu(map, val.x[0]); > - } else { > - /* No point in a 64-bit byteswap since that would just be > - swapping the responses from different chips, and we are > - only interested in one chip (a representative sample) */ > - return cfi32_to_cpu(map, val.x[0]); > - } > + /* > + * No point in a 64-bit byteswap since that would just be > + * swapping the responses from different chips, and we are > + * only interested in one chip (a representative sample) > + */ > + return cfi32_to_cpu(map, val.x[0]); > } > > static inline uint16_t cfi_read_query16(struct map_info *map, uint32_t addr) > { > map_word val = map_read(map, addr); > > - if (map_bankwidth_is_1(map)) { > + if (map_bankwidth_is_1(map)) > return val.x[0] & 0xff; > - } else if (map_bankwidth_is_2(map)) { > + if (map_bankwidth_is_2(map)) > return cfi16_to_cpu(map, val.x[0]); > - } else { > - /* No point in a 64-bit byteswap since that would just be > - swapping the responses from different chips, and we are > - only interested in one chip (a representative sample) */ > - return cfi32_to_cpu(map, val.x[0]); > - } > + /* > + * No point in a 64-bit byteswap since that would just be > + * swapping the responses from different chips, and we are > + * only interested in one chip (a representative sample) > + */ > + return cfi32_to_cpu(map, val.x[0]); > } > > void cfi_udelay(int us);