Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp364667lqh; Sat, 4 May 2024 04:44:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVvsEENC8bHiKhZWJr39wBmSL/EHm57Is5LLSs8r7KgjMnVqsNh3jxgEVf4wlnmTVQE6sPeYGvZeO1dnYYf/Y+7YtTXIV5ECaFfbMiS6Q== X-Google-Smtp-Source: AGHT+IH4VImiGBMNjKx1IhNU1p96soz8seViZTAif3YseRqQiq6Ur3FeXmflS6KKgSyROSprV/+2 X-Received: by 2002:a05:620a:4689:b0:790:6a6c:8712 with SMTP id bq9-20020a05620a468900b007906a6c8712mr7429883qkb.42.1714823068861; Sat, 04 May 2024 04:44:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714823068; cv=pass; d=google.com; s=arc-20160816; b=Ij37ckfX004UDqjxXWuDlAEm6aAcJmiFjuIwNw0+DHkdfW1AglrArnRC5/Mk+M+2nE kj6piMVwU5Y+7rtdswn2bDR/9ihUsBhL6CcPTCSZPyrWE9wFRfG7GbjmgfeJD7sRB2eq 5ntDND9SOqlFKDjpDJp9zpo3EobKhRPqMEtXRgawdFJnrYE9W5CaEdjXLRsoXtaPU2UT YR+6a6V58JfIcIcBUW+BBM2wgp9FqvoWda/FtdOx11NTxzJVD7p5R4eJsgYcdeLMpG8T jiTQJR1tCbYsNaFqUvdWAAUpKlTyXP4hcxLCN1oNTx4qd1MOYuH9VAP9+hyzubyySJ6E jgtQ== 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 :subject:cc:to:from:date:dkim-signature; bh=R2LirTH2atFiNsxVciwKHxHd6MQFzdxumavxnlbks04=; fh=hds5/xKMMI5Gt6aamAPIYoJfzDu/w38KLk7GGTB+wdI=; b=F9O6MeOcwxTGsO31k3ts8BSYkXF9vXN16SHk8E+EURSNZV5lfCffyLmqVXn4dm4qmd T/BZmPSSjTGCMFKwu5PdQmsRw5fyztj0M++hqe3MfUl9m6Yck6oOICu+Kfhxl8U7QL8I 7VXx3ilj9QhXTVMcoyuoPJ+lKqNZNdmD5yp/wnNmqj+W6PXyZlGnW08uJfdT1pFAh/16 gac85nP6/dNS+ub9+V2nXUP+3dQizW0TvDCrozZ8NZ1JAWaL9DIaL63s9pDTSRassg1p 3SWbP8CDNFnVyHDAr6fuQ9bCBffh+VzAbC/ZuGRr1jguzuL7yD1o3EnrYgpsrMFhujOx GD+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SdodTOiw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168616-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j16-20020a05620a147000b0079290717401si194105qkl.113.2024.05.04.04.44.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 04:44:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168616-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SdodTOiw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168616-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 94DAC1C20AF5 for ; Sat, 4 May 2024 11:44:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2492620335; Sat, 4 May 2024 11:44:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SdodTOiw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 48B3017577; Sat, 4 May 2024 11:44:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714823059; cv=none; b=a5x0ImtR2RUX5vmL+S6uf8GIbPnUzGtRyXfV3H4/dfk5y4pRmn0KsOm8bxuT6VYfXuotigpI70ZB+vpYBdsQT2CIUXG7TaV0TQVHe+UioGDZ+9+K7kooPharFffo1Ssu65jQMLw7efm8gozA+9FbvSM9N1O7rUwR5dvNZoUamLM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714823059; c=relaxed/simple; bh=nhPPpbOqhYfSHBSbXUHRoGUDplochmKW9eJvPRWtz/Y=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ESXcGAXYY/orG/MtHYdoDbCSEHh1r5GwZPzuLqZa0vSIeFoCHfbmcKyGjwLj0BVlwT1mWK5GxzJ3eJtWeXlLLgIVs+JNRQOr2p8w9tUgstewAic/UgT2vZljOoPPcn+on+rLAJHgdb4UFXEf/VspjMj9QPvDSqkcJLBISP8mm0w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SdodTOiw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A7E5C072AA; Sat, 4 May 2024 11:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714823058; bh=nhPPpbOqhYfSHBSbXUHRoGUDplochmKW9eJvPRWtz/Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SdodTOiwwafOYFjvddOqmNk4bECY9u/MWGWPgX0XjO+XKZXF5kI/cc/74NeSCECRD IYFnQLaik9GXt2WXY04hKUD3SbnN4WV1ZVjeEX8tW5b+ybfIMipEdWChg0/XI0mcSU qd1/YWG/yFSV2ibQIYCclAUQnL0eLhkqWtn+DDj3NtKUan6Zqih/iGSOzcX2/uxjCE S4+YqXAMkWYgnRne6y0W9Svd09SkAbe7XB7oz/YCewb1IG4v1NtBgNPMHnUR94LQLs yA5jceGG4maEM3S8NbZUv4AbVxjGRJc8rItNHG2/NWmBwZGMLyF0o1qS0lmlaEp8qu WteNqIxbwGBcQ== Date: Sat, 4 May 2024 12:44:07 +0100 From: Jonathan Cameron To: Christophe JAILLET Cc: Lars-Peter Clausen , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-iio@vger.kernel.org Subject: Re: [PATCH] iio: light: gp2ap020a00f: Remove some unused field in struct gp2ap020a00f_data Message-ID: <20240504124407.1ac6f07e@jic23-huawei> In-Reply-To: <57e9f29c7062d1bb846064bf6dbd7a8385a855e7.1714568099.git.christophe.jaillet@wanadoo.fr> References: <57e9f29c7062d1bb846064bf6dbd7a8385a855e7.1714568099.git.christophe.jaillet@wanadoo.fr> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 1 May 2024 14:55:17 +0200 Christophe JAILLET wrote: > In "struct gp2ap020a00f_data", the 'pdata' field is unused. > > Moreover the "struct gp2ap020a00f_platform_data" is defined nowhere. > Neither in this file, nor in a global .h file, so it is completely > pointless. > > So, remove it. > > Found with cppcheck, unusedStructMember. > > Signed-off-by: Christophe JAILLET Applied to the togreg branch of iio.git and pushed out as testing to let the bots play with it. Note I'll be rebasing that tree on rc1 once available. Thanks, Jonathan > --- > Compile tested only. > > It was added in the initial commit bf29fbeaa13d ("iio: gp2ap020a00f: Add a > driver for the device") but was never used. > --- > drivers/iio/light/gp2ap020a00f.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/iio/light/gp2ap020a00f.c b/drivers/iio/light/gp2ap020a00f.c > index 9f41724819b6..9a476697aa1f 100644 > --- a/drivers/iio/light/gp2ap020a00f.c > +++ b/drivers/iio/light/gp2ap020a00f.c > @@ -237,7 +237,6 @@ enum gp2ap020a00f_thresh_val_id { > }; > > struct gp2ap020a00f_data { > - const struct gp2ap020a00f_platform_data *pdata; > struct i2c_client *client; > struct mutex lock; > char *buffer;