Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2156162lqz; Tue, 2 Apr 2024 08:44:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMn+U1E+NHUE96m4kq3k4wOJm65jPQ7kCcHDzRyUIrcMHItMrxjyQ+m+jhClQJlWaU8w+JvF/xF+EXk23z13IrkdnfxiH0H19f0CjGLA== X-Google-Smtp-Source: AGHT+IFCACu4lmUyErcQOrv7Ni+/LXifhGNSnHKNWYIrhRWEIqkzTVBoYMAuLQn11K1cT+zXIcbE X-Received: by 2002:a05:6402:354d:b0:56b:dfe7:ea5a with SMTP id f13-20020a056402354d00b0056bdfe7ea5amr162196edd.17.1712072691233; Tue, 02 Apr 2024 08:44:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712072691; cv=pass; d=google.com; s=arc-20160816; b=oraWFBrpSN3hj07o2Um4fJbquOe5pSIuIfABcZZKw/9vBF2mCl4e1lwoX1D5h3aMb0 g7yjjSi61ICbnK3v3vUR/jmVLRn0wyl4qlbvjeRHEmh2lw3NUJ9yP9egAY2WPV/YpCdl KM6pd93kThW/ECEwgRcloEubpVNpJgnZYyGHSFocaF4+kArzISPbrZYCQzjIh0/1sf3Q dDeiEeHI6DQjVP3HtJ1FGPG8O8OUD+KgDp2x2D3ir0zR9KOzLsP3YyvJHxP7bXsMfDaQ t7QM6eG8I1BEZ7VNdQR3S0eMqiGOsMqU7BmqzffuzOQjt98FHGWVKWPqeTypHc47ff+A eBAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Yt4Es8PJkyi6dEw19CkS8aylIsEs8z3XqiVhT0VC1l4=; fh=G+kXbXZ7X6Rrw4sqwu0pPJ5LnQ6m545XsQoac6catcE=; b=qvMY7B1Nx/j+1pylFSJYMWCEoUN2lAcLeH/8sIWL4IpkavLwjDmu8kGeqgoWGQ+CKW 2bhcmHNt1EIL8ffnSvGgcER2vDNgBHOFrmghofSW66urR//JnhT9c5L0N0k0jE8c9sjs dcuKOIRlhwzXvnRMkt6i5I6KYEtOtW3A5maFvttWkge4kITBalK62kpUPlj5tMZHI+07 dEJsz5CLFUx4bFhKnheNu7aN/mFIVe+/utBvy6ub5MPW4WrSGPgFVNvRm0PEhypYXq4W WlxefuFu9b0sNrnw+pNJATSt/mGTsDXl1BEDeerQ8+1AayENz4ftt+bvf3IvlnRC+TJw stfg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OKapIKiQ; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-128264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u19-20020a50d513000000b0056c19c5b33bsi5596573edi.663.2024.04.02.08.44.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 08:44:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OKapIKiQ; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-128264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id EF8FB1F24FFF for ; Tue, 2 Apr 2024 15:44:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A71E137C43; Tue, 2 Apr 2024 15:42:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="OKapIKiQ" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 C2178135A5F; Tue, 2 Apr 2024 15:42:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712072553; cv=none; b=Y4nDYodjeak1CP5l5EcijGDejX4AW0arD+pZjRaPnWcYLm5gQNB9aYmw89bJhdj/MfJjN+3wGC4D93k/dJxvBcfiK5GLFX7JIlEvZDc3oeXagu5rxKJPp7UmXDIgSkYbq05n3pDeQn5MGfoy/Hrdin0FA5yzBwQznsQyab1ihAw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712072553; c=relaxed/simple; bh=nPKJLyGWUAo20JnttXNN/dLtu3GQiMS1v2MSYR4PCTE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aQpbJm+Ha4znPlem90KV4UwTj9g+413U3ifV3M/jq+HTjUnrsgMX3cYRsYJzvTIPNVvK4HJV8K1tejV34GVBkFpdn6X9SkvD2ZXVGT7vBt5h6VYg0Ns6N/opjkKFxyl9nSO3qPcI9pBHj470xdWVtgKMlw+oFoXwPzR1TttelKI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=OKapIKiQ; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712072551; x=1743608551; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nPKJLyGWUAo20JnttXNN/dLtu3GQiMS1v2MSYR4PCTE=; b=OKapIKiQnpaAzPbdKpkNg23I+AwZWYh0aiEeTU34pkTkzFZNNzFLrVxF fCI2ys43UeC8gHkwSNZpPxP0UcScsvK953ZgSGz0cqZA7fkQGXFM7NxiE +QHTQ0WsMpq/ihWbze+pZxsfe7Cl3/372kvA3j/e3civzyJASKJj6zm4J xyfmcFVwDz8K6l3B0qUOGMApeYv2+mFYy3/7qpsm/vP8DINrtZhizBG25 /uQDMQs1XAhMGgTvsv2D9BwymP3KAwWdYTIWr3SNbxuTrMeMm+uVzqT+V I7RHIe8Byn6gxChvVGvPF+xDHLybGDa2VdQEcQ5Nsqx27FqReoxo/iHQ1 Q==; X-CSE-ConnectionGUID: t/I/g15RQIyG/oH2ePlKPg== X-CSE-MsgGUID: eGlWa7aJS4mL1ofe6KwveQ== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="17870089" X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="17870089" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 08:42:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="937083648" X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="937083648" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 02 Apr 2024 08:42:23 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C8ED716A6; Tue, 2 Apr 2024 18:42:20 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Jiri Slaby Subject: [PATCH v1 14/16] serial: max3100: Remove unneeded forward declaration Date: Tue, 2 Apr 2024 18:38:20 +0300 Message-ID: <20240402154219.3583679-15-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240402154219.3583679-1-andriy.shevchenko@linux.intel.com> References: <20240402154219.3583679-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit There is no code using max3100_work() before the definition of it. Remove unneeded forward declaration. While at it, move max3100_dowork() and max3100_timeout() down in the code to be after actual max3100_work() implementation. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/max3100.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c index 19b05992a9ac..e63ac027b4f3 100644 --- a/drivers/tty/serial/max3100.c +++ b/drivers/tty/serial/max3100.c @@ -150,22 +150,6 @@ static void max3100_calc_parity(struct max3100_port *s, u16 *c) *c |= max3100_do_parity(s, *c) << 8; } -static void max3100_work(struct work_struct *w); - -static void max3100_dowork(struct max3100_port *s) -{ - if (!s->force_end_work && !freezing(current) && !s->suspending) - queue_work(s->workqueue, &s->work); -} - -static void max3100_timeout(struct timer_list *t) -{ - struct max3100_port *s = from_timer(s, t, timer); - - max3100_dowork(s); - mod_timer(&s->timer, jiffies + uart_poll_timeout(&s->port)); -} - static int max3100_sr(struct max3100_port *s, u16 tx, u16 *rx) { struct spi_message message; @@ -313,6 +297,20 @@ static void max3100_work(struct work_struct *w) tty_flip_buffer_push(&s->port.state->port); } +static void max3100_dowork(struct max3100_port *s) +{ + if (!s->force_end_work && !freezing(current) && !s->suspending) + queue_work(s->workqueue, &s->work); +} + +static void max3100_timeout(struct timer_list *t) +{ + struct max3100_port *s = from_timer(s, t, timer); + + max3100_dowork(s); + mod_timer(&s->timer, jiffies + uart_poll_timeout(&s->port)); +} + static irqreturn_t max3100_irq(int irqno, void *dev_id) { struct max3100_port *s = dev_id; -- 2.43.0.rc1.1.gbec44491f096