Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4590173rwd; Tue, 30 May 2023 07:25:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5C+6mZFw+HN/YnAsRelsZoAI4bQTpnhEiANCUWfnEbYZeXEVvgTgs7uZoF5q4p8uJKweeM X-Received: by 2002:a17:90a:cc9:b0:256:6f35:fd60 with SMTP id 9-20020a17090a0cc900b002566f35fd60mr2526066pjt.17.1685456744162; Tue, 30 May 2023 07:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685456744; cv=none; d=google.com; s=arc-20160816; b=PudieLKB1XiRuNx5LcPoPsMger0pRa8/19SoCVwOQFteKPLtotwqGCuaBAqyp7ngd4 LWnoEFJ9QnMihEnMaOJQwvBqV5/Z8y/3yagIB1jRs9B33lMxjXzheHIM04mhV0FiFdyv RfPwexBmC/9TXu6Z7o419lOFM+s/JJN9AHbmMKhKdciaYbkJNPFYVgVzGd7WS20iVcej 8txLrkWe3BfMbgg+w1bdNVy9rhx49ER99w6EFHVorqFc9U5qD9bHNAI7VKzdjK7hU6eZ 78OausidATrxDSshHvoqqUjFa4YIDlPG0omb1V3eICUzMrV4H1CVBPpz1R9n5JDSfbKe JH5g== 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=Xtt1L+uuHuKWVzeZoc9xYWNpwCCnPddhAtg87F8zRaY=; b=Pa0/bq/ezRe0N9whgLw9Qy/gwdvK6ZhyhknjIVBCaSEKtfoT9YLUKUqkWyuiae5YF7 NzVfIpV33BVwq/WpfWFNbEVQWhFHMB/JBOd5NxKAeKBPFYQtNm4vHJHD21XLuZvYeLbj n5qbnd3WE/wr83183eaSWuzyfPnjSP9L4lLGQxzSxDC4vFruRW+9dwpNOqmdomnlThHM t/plEH8a0o2ReVciM5h+y6v9xnU/f9gW6LgB/AocxU5jqC5Sqpsh1GB3x0bnwXE6Yr0W Ubch5Kbv4ZUEQwYOHQRC2R6F6haaPp/wtlcdtGGvGnME7FI/Sh0Cl8c5Bmy5ciRC/Ncm lNKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ne5lq2Mj; 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 t16-20020a17090aba9000b0025653dc2881si5712196pjr.23.2023.05.30.07.25.31; Tue, 30 May 2023 07:25:44 -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=Ne5lq2Mj; 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 S232795AbjE3ODD (ORCPT + 99 others); Tue, 30 May 2023 10:03:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232468AbjE3OC7 (ORCPT ); Tue, 30 May 2023 10:02:59 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55B72EA for ; Tue, 30 May 2023 07:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685455378; x=1716991378; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Odlz6QoyGHLlPacaqDxKEe73Bq1p2WtniVZNmbgCKKY=; b=Ne5lq2MjZQwSI4I6RUoIaSXLy6GPab/42FTeoyArlzDs3jWqs8gIKlTk Xv+mD2V5+/79Ion13mpSzdUEjfuGrDwMyyvS1I8OPE0YihpRVfUUK9x9B nnybVjc0Pfpuj75TIpf9U33MF/OT0xgfz3nAt/Sl3nINo6Oty05L7V1AX lCaaiEKIfhtHb6XplgLzDAnCFrwU16jTjh7y16OFpeIz1cCFa1rH3RVsV 6/N+oa2yy4jDTNGdljwkS9Lx6J0K0cEloWBvQrg143tm4AznPQsYczS6d E6O6xLUO9UTlsSvKXrm7nY8c3b1TAdpeP7jLl8wurT1yMW9HCw2OLEpwi A==; X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="383179417" X-IronPort-AV: E=Sophos;i="6.00,204,1681196400"; d="scan'208";a="383179417" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 07:02:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="953142977" X-IronPort-AV: E=Sophos;i="6.00,204,1681196400"; d="scan'208";a="953142977" Received: from mtkaczyk-devel.igk.intel.com ([10.102.105.40]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 07:02:56 -0700 From: Mariusz Tkaczyk To: arnd@arndb.de Cc: hch@lst.de, andriy.shevchenko@intel.com, dan.j.williams@intel.com, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/2] misc: enclosure: remove get_active callback Date: Tue, 30 May 2023 16:02:22 +0200 Message-Id: <20230530140223.13994-2-mariusz.tkaczyk@linux.intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20230530140223.13994-1-mariusz.tkaczyk@linux.intel.com> References: <20230530140223.13994-1-mariusz.tkaczyk@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,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 callback is not used, remove it. Leave possibility to read cached ecomp->active value. Reviewed-by: Dan Williams Signed-off-by: Mariusz Tkaczyk --- drivers/misc/enclosure.c | 4 +--- include/linux/enclosure.h | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c index 1b010d9267c9..59704fdb962a 100644 --- a/drivers/misc/enclosure.c +++ b/drivers/misc/enclosure.c @@ -534,11 +534,9 @@ static ssize_t set_component_status(struct device *cdev, static ssize_t get_component_active(struct device *cdev, struct device_attribute *attr, char *buf) { - struct enclosure_device *edev = to_enclosure_device(cdev->parent); struct enclosure_component *ecomp = to_enclosure_component(cdev); - if (edev->cb->get_active) - edev->cb->get_active(edev, ecomp); + /* The value may have been updated by edev->cb->set_active(). */ return sysfs_emit(buf, "%d\n", ecomp->active); } diff --git a/include/linux/enclosure.h b/include/linux/enclosure.h index 1c630e2c2756..8d09c6d07bf1 100644 --- a/include/linux/enclosure.h +++ b/include/linux/enclosure.h @@ -62,8 +62,6 @@ struct enclosure_component_callbacks { int (*set_fault)(struct enclosure_device *, struct enclosure_component *, enum enclosure_component_setting); - void (*get_active)(struct enclosure_device *, - struct enclosure_component *); int (*set_active)(struct enclosure_device *, struct enclosure_component *, enum enclosure_component_setting); -- 2.26.2