Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp402223rwe; Thu, 25 Aug 2022 02:27:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR6VeoXxrYb0ZGKS1C4IfglQL1CYHbb42EyCbaTBoZPHefxc0btD4G3S5x4rne1lj6oR0f/8 X-Received: by 2002:a17:902:ecce:b0:16e:e6e9:69ba with SMTP id a14-20020a170902ecce00b0016ee6e969bamr2948424plh.97.1661419621638; Thu, 25 Aug 2022 02:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661419621; cv=none; d=google.com; s=arc-20160816; b=qEaEZX/3veC3wnobiv6DGbkk++nO1/JqkK3mSmpdrzqbMbfS1gQ3ALCeRdRc4hJBG7 EfUZlyqln8JXK1wER4iWBjKX1qdngw7kWrwQy6sGuQYrnh2ODlCOAVKvryaDz7wVZI2l U25e3BOkHZXjZseQdS+m3AlNdZOOJNkE5+ofts0DrBu+zUoifyk1Q5HIZ7BNRCLgZ1we k1cvMUt0M+eNU08cCuAUPP5cjFrIQsKI0sbHYJIsOCdQaFRLqaHccjQT16GMThvjE9bG luzWHdX4WsFVxrfBTsXQsouAVOFjxr1qsr2aWHhrgwBk3HQ70b6vf4sMg0tLgQfM0nyQ tIow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kH2HFXBJqNScTf2IE6/cjqQsCyDia/2dHJJ+MWfBvkg=; b=py/Vj0LANpKUhtluovz6Z8TqxpgC9X4M4eVU5Fl6BtES0o6q1Bqu+5qzJPpydT5OF2 MAlUOSXUjjbthRxFR7hSBO4Jn4cxz/ClmDSdlJ37EudKOzn7ohS6tA3s5KBI806OSeC4 OSnBn9uLopvLnhpkO8sdV9JgVD9hwi4XBRxanHx+4KbbuUOBQkMyfDKUN6QVkA2/d9o+ eGBfqkfYe4aY6lg4/OJkRs4sbHxlUG9NorMuW6gnXtl6bR6ez5+yZfiraXInkx1MpQTp x3yuzuYicnLdCACOjxTGBRo21L6796LHjCLAR4UKRH2Hspb0TYXYaXOnPOszc/wB8pOZ WZkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Vz3tdMAV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pc18-20020a17090b3b9200b001f4f595b12esi979081pjb.124.2022.08.25.02.26.48; Thu, 25 Aug 2022 02:27:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Vz3tdMAV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237946AbiHYI6u (ORCPT + 99 others); Thu, 25 Aug 2022 04:58:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237255AbiHYI6h (ORCPT ); Thu, 25 Aug 2022 04:58:37 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B2DEA8CD2; Thu, 25 Aug 2022 01:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661417913; x=1692953913; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YcSvNB23AhSi5EswqOVHYUWtaN9VoCvzviSsnzaVGZo=; b=Vz3tdMAVMZJYa4sCxqp/mHg1yX+4SBT1g5I52dNaEtHuwa4K4p2/00sz CqLjnPHQfjhJmmvQ0/HN2DXBLu3432y+wlHv1ZvasrcJR6ED8V8Q7oiYF FZczXvN5Zz1s3LM98+VtcOJWezoEVJ6QUEQH5eTkxtv2SiIhUHce2Ccyz 9ehUqtTjSuTBTOuoB3AG78xVfHyXOESSLnViv0XKJsFIcwyHWsBweEdDk 0lTio3BoJ3fPiBnNKuIP+4TpQnkXLik9qZUPZ3/IpL2YitITQSM9rfjuy msj2v98/qeC1jTVH4QCPo1p6WHMbgZ8fX72QQbxspzpIt2rNxyAkrMBNL Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10449"; a="273941431" X-IronPort-AV: E=Sophos;i="5.93,262,1654585200"; d="scan'208";a="273941431" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 01:58:33 -0700 X-IronPort-AV: E=Sophos;i="5.93,262,1654585200"; d="scan'208";a="670893942" Received: from mblazque-mobl1.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.249.44.101]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 01:58:31 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 4/5] serial: sunsab: Remove frame size calculation dead-code Date: Thu, 25 Aug 2022 11:58:09 +0300 Message-Id: <20220825085810.7290-5-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220825085810.7290-1-ilpo.jarvinen@linux.intel.com> References: <20220825085810.7290-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver features a custom frame length calculation but the result is never used. Remove it. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/sunsab.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index 6ea52293d9f3..f7968f73753d 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c @@ -681,27 +681,23 @@ static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cfla unsigned int quot) { unsigned char dafo; - int bits, n, m; + int n, m; /* Byte size and parity */ switch (cflag & CSIZE) { - case CS5: dafo = SAB82532_DAFO_CHL5; bits = 7; break; - case CS6: dafo = SAB82532_DAFO_CHL6; bits = 8; break; - case CS7: dafo = SAB82532_DAFO_CHL7; bits = 9; break; - case CS8: dafo = SAB82532_DAFO_CHL8; bits = 10; break; + case CS5: dafo = SAB82532_DAFO_CHL5; break; + case CS6: dafo = SAB82532_DAFO_CHL6; break; + case CS7: dafo = SAB82532_DAFO_CHL7; break; + case CS8: dafo = SAB82532_DAFO_CHL8; break; /* Never happens, but GCC is too dumb to figure it out */ - default: dafo = SAB82532_DAFO_CHL5; bits = 7; break; + default: dafo = SAB82532_DAFO_CHL5; break; } - if (cflag & CSTOPB) { + if (cflag & CSTOPB) dafo |= SAB82532_DAFO_STOP; - bits++; - } - if (cflag & PARENB) { + if (cflag & PARENB) dafo |= SAB82532_DAFO_PARE; - bits++; - } if (cflag & PARODD) { dafo |= SAB82532_DAFO_PAR_ODD; -- 2.30.2