From patchwork Thu Dec 21 23:18:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugo Villeneuve X-Patchwork-Id: 182471 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp742686dyi; Thu, 21 Dec 2023 15:20:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/WqXBhxsPmAKGxLl4Zm+HxPGseknFFL6onLY2d/T/orEnf/yuFOk0EBLNCJy7ISO9/7n5 X-Received: by 2002:ac8:4e95:0:b0:427:87f6:9436 with SMTP id 21-20020ac84e95000000b0042787f69436mr788202qtp.50.1703200818436; Thu, 21 Dec 2023 15:20:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703200818; cv=none; d=google.com; s=arc-20160816; b=zzwoRU58ic9Yq54GlhvyLQ75WWf/W+zClu//7xHYnqS7oso6l9jAH+w03l8pwGAeH5 D7y5UK7p8D8RoS8SXErqgwsnqvj8mtND9+BunGObWR78/zrZl3ZCYeHTV06YIG247whN 336zjBOFDmMZ1R2+CasWdm5ytDDohdAuhbglpMozCcG4sRZy/noZ/iw3Lyp7gOUN6o0d jTgeMg1zFRd7MCl/4bAMn7tQ53x01akUcp2nxHZdzjPFsTYiqGIF8z2rmE+H0QQszlSN dkg3zCi1cBvhep1gWAZS+ix72S4UB9tRzmAyXvd+vd93SsWcg1I7ks5QAsskaqtfuBxs ohBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:cc:to:from:dkim-signature; bh=erjmsDZRhrWnaUKZ8qETR02HqNmxBDRKhVazGRk6Y6c=; fh=xLWyschydcwW23fRlVvCnAn0jM2rGvhMoJ71MHWBla4=; b=W/bqrNcR7T6ULUEDrFV0J02ZdAoM9EPGKRVPguxb2iLB+8OEK7pxCRYqWz/5f1iexD 8KLmV+0S7C4EOKYzzaydLWG1fiOLBwSj3bqyi+V03l44vQJ4UG/AGI5HzPCT6L7Q6iVl BMwL4hMMIY26fumTgSeCa+j5fwqzumuRvxspiSXy70yHOsgB+VhBrP4FgAmvtEQlF1C+ IWUSibcCKvFvYwd85RZY1r6E5kWXuToe+1+gGVOVu/ZVgAvH4GgaQaKMfTaqif7nqTcO XhG3wP2zSkgNORWXAQqhVsUaKcUfQ5r5OUtxo02E2H8xTn7kSqY72MIe/xgrsSXSn8Pk ggiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=zMCNLWRH; spf=pass (google.com: domain of linux-kernel+bounces-9161-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9161-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v4-20020a05622a014400b004275bd26e1bsi3166136qtw.316.2023.12.21.15.20.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 15:20:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9161-ouuuleilei=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=@hugovil.com header.s=x header.b=zMCNLWRH; spf=pass (google.com: domain of linux-kernel+bounces-9161-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9161-ouuuleilei=gmail.com@vger.kernel.org" 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 3B6391C208CF for ; Thu, 21 Dec 2023 23:20:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FEA57B3CF; Thu, 21 Dec 2023 23:18:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b="zMCNLWRH" X-Original-To: linux-kernel@vger.kernel.org Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) (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 5224779476; Thu, 21 Dec 2023 23:18:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hugovil.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Cc:To :From:subject:date:message-id:reply-to; bh=erjmsDZRhrWnaUKZ8qETR02HqNmxBDRKhVazGRk6Y6c=; b=zMCNLWRH1QBvIOWMSl5ucZv1DI OIr0CLz2DSqWjjJKTKBAzopDz3H+yHH0wybHv9e9wmzSugawY6VGj8ZLH0Z7uFuLfGhJTGfRnxB4A klxmadOeZDUji8CZIc5d5fj+NphUD5SH1cfsCWUUfh2KzbuaWRYAae4h//gUCPRmqlHo=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:52484 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1rGSJR-00025W-KB; Thu, 21 Dec 2023 18:18:46 -0500 From: Hugo Villeneuve To: gregkh@linuxfoundation.org, jirislaby@kernel.org, kubakici@wp.pl, indrakanti_ram@hotmail.com, phil@raspberrypi.org Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, hugo@hugovil.com, Hugo Villeneuve , Andy Shevchenko Date: Thu, 21 Dec 2023 18:18:18 -0500 Message-Id: <20231221231823.2327894-12-hugo@hugovil.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231221231823.2327894-1-hugo@hugovil.com> References: <20231221231823.2327894-1-hugo@hugovil.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 70.80.174.168 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Level: X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -0.0 T_SCC_BODY_TEXT_LINE No description available. Subject: [PATCH v2 11/16] serial: sc16is7xx: add explicit return for some switch default cases X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785935501208103606 X-GMAIL-MSGID: 1785935501208103606 From: Hugo Villeneuve Allows to simplify code by removing the break statement in the default switch/case in some functions. Reviewed-by: Andy Shevchenko Suggested-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve --- drivers/tty/serial/sc16is7xx.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 6181cc6f934b..da862b8efcbe 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -460,10 +460,8 @@ static bool sc16is7xx_regmap_volatile(struct device *dev, unsigned int reg) case SC16IS7XX_IOCONTROL_REG: return true; default: - break; + return false; } - - return false; } static bool sc16is7xx_regmap_precious(struct device *dev, unsigned int reg) @@ -472,10 +470,8 @@ static bool sc16is7xx_regmap_precious(struct device *dev, unsigned int reg) case SC16IS7XX_RHR_REG: return true; default: - break; + return false; } - - return false; } static bool sc16is7xx_regmap_noinc(struct device *dev, unsigned int reg)