Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1269416pxb; Thu, 16 Sep 2021 03:54:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyH1h6DhTQu4FK8qLSdLocPTpjUDe4cre7nmSWVUbLRwa+P6NxqnSpcWvY5q7v5XhSPyMyF X-Received: by 2002:a05:6e02:1112:: with SMTP id u18mr3601201ilk.75.1631789692168; Thu, 16 Sep 2021 03:54:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631789692; cv=none; d=google.com; s=arc-20160816; b=OBTByvL/g/FKvbNJeddWcBbTH8axKh/jLro7wXDnLfkozeIrmfzvil/SjWChlE2iW1 KK1ayjD4nnNcduimWk7jAfwtIpYeRHBTxkHPmtRupr/i9jgKGcUzv9QITWC32rbqT1nE aNr6Njl/l3TwzX+35l/hqidiCGnqXDNnw9J+9yaGUqTVwJ2K4NRRc83ZTGigDSD7ktFx SvHfEUPe7g2VmXeQ/0WzVP0wU7Qw5Sh5TQkMqoEk7XH0DWYGdr3yABiyd54XZugxUxcF FSV1V+D2yEXZKAypbC1YT6khY2f6oRfFh7REEW76WJ4OifHuM8DwdeDE1p4Ko6LU4910 Wwew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=4Lgdn0Ixo4EbM/31cJClCQJWWjH8/3D1avitifyopTc=; b=zJoyQY5xwNvcexic1jyci/eTaZzJ/wQuKqgWIK5u0l6+GF6gttD3253HS7XsYloqC1 Wp+bQZgse48VJP7k/a3E8qhDucxBgLdsDTVux74j+hhrB3MMzMZCxelyc0eVJjf9U5GV LOLXicwWFd+Hsx2Ide5TNFnHnV8ykwCkZQqM+UsTU8KpV1WuB1VyJHii+5bcIg4fDqqh kggp6Uf7+NEKgXnxgv8Glm0YjEB2Ig8h18VXIJh5jBJEb4KwioyvPftjJyvLtcwwYoaD 5JM7/lK1hSz8M4g0hqOcjYN2hSLx72+T4XD19PGnNe/9q9XcA9Bx2YFjdMvKKzwQ0Nma Uvnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=KMoIjDlL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i185si2252742iof.61.2021.09.16.03.54.39; Thu, 16 Sep 2021 03:54:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=KMoIjDlL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237253AbhIPKyA (ORCPT + 99 others); Thu, 16 Sep 2021 06:54:00 -0400 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:36258 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237292AbhIPKx7 (ORCPT ); Thu, 16 Sep 2021 06:53:59 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id AAEDE40260 for ; Thu, 16 Sep 2021 10:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1631789558; bh=4Lgdn0Ixo4EbM/31cJClCQJWWjH8/3D1avitifyopTc=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=KMoIjDlLhdEMs5JE3kO5P1k5c11sBEz7LrWCUXbztNSipnZADfb0fhItn1T0B5s0d eUP7fx89zxd+F0J83LovwUCIVBKVovvPmxt2GYLAy0ztatLWQkYRcNPa8bQufbImxB FBO704FbpqbZDt07uT7Eunz1nRtj2pap+BuIkYPil+oTCFXIhZbTScdKF3xCclodFe mdDyWR+fPsbhKFyEo3B6FEfAfyiCLhe2Z8CMaWCZ2IK9VmkKdYytt1/jyVCBg9L4zr tqNfAmpB9c3i7nQtfsCcAtUXHnjQDyd+WzoNFLU0pqzNF6YteBSbkd/irMhKwqgeYt xDD38ehX/agvg== Received: by mail-ed1-f69.google.com with SMTP id j6-20020aa7de86000000b003d4ddaf2bf9so4981579edv.7 for ; Thu, 16 Sep 2021 03:52:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4Lgdn0Ixo4EbM/31cJClCQJWWjH8/3D1avitifyopTc=; b=gLylc8Xucbfoc9DMYtbETTZfKWwF9t0sgM1xYVWRNqyF/7jBE8DefAcL+RR7xqBfLI z6YZ1IjVByFjR5xBxn1061GT63SASA7VDkZ/COoegz9LE7MfK0eDhpSb5EkDTj6JIeSv 8VpYVV4LAhVdUdy7nH+lFfNVU36foH0oSkFnHnWgEL+unU3rE1fvwGmg7omuy07ALL+N bLCTW62m9Z4c2amZenCDIaHFrfNv2dCEEHywIa4UrETGYJC9/v9w0rx8VNjU1wZd8XGD FYsTMJzp+gCgK3DppJfKeS2l7Jm3ttv7K8PtTy7gyue+kFnyRm/FoTfEBavcCw6uJL4s JzFw== X-Gm-Message-State: AOAM532S2a3iEVp/c+fpGv3eNxOyGmZqKjeAsEy9xKMveBnad0slJa66 flGZqDkkyzLwspSOAycgRITTE4B1rle3TsVy0OPDacwvF7GwcPRz59JpXhA14ZhSgiML145V8oL suColxPuaVeY9LXAviYtXWJUp550gh5rHmPNXqPQXoA== X-Received: by 2002:a17:906:4413:: with SMTP id x19mr5475679ejo.234.1631789558220; Thu, 16 Sep 2021 03:52:38 -0700 (PDT) X-Received: by 2002:a17:906:4413:: with SMTP id x19mr5475670ejo.234.1631789558079; Thu, 16 Sep 2021 03:52:38 -0700 (PDT) Received: from [192.168.3.211] (lk.84.20.244.219.dc.cable.static.lj-kabel.net. [84.20.244.219]) by smtp.gmail.com with ESMTPSA id d16sm1244793edu.8.2021.09.16.03.52.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Sep 2021 03:52:37 -0700 (PDT) Subject: Re: [PATCH] i2c: s3c2410: Delete unneeded variable: "ret" To: Xiang wangx Cc: linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210916103718.29956-1-wangxiang@cdjrlc.com> From: Krzysztof Kozlowski Message-ID: <0d1a0027-e74d-9f07-3b96-372b5ca14ae3@canonical.com> Date: Thu, 16 Sep 2021 12:52:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210916103718.29956-1-wangxiang@cdjrlc.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/09/2021 12:37, Xiang wangx wrote: > variable: "ret" defined but not used in function "i2c_s3c_irq_nextbyte" > > Signed-off-by: Xiang wangx > --- > drivers/i2c/busses/i2c-s3c2410.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c > index b49a1b170bb2..6df85b23156c 100644 > --- a/drivers/i2c/busses/i2c-s3c2410.c > +++ b/drivers/i2c/busses/i2c-s3c2410.c > @@ -385,7 +385,6 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat) > { > unsigned long tmp; > unsigned char byte; > - int ret = 0; > > switch (i2c->state) { > > @@ -548,7 +547,7 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat) > tmp &= ~S3C2410_IICCON_IRQPEND; > writel(tmp, i2c->regs + S3C2410_IICCON); > out: > - return ret; > + return 0; Change is okay but I would go step further - made the function return void(). None of the callers check for return so no functionality is lost. Best regards, Krzysztof