From patchwork Wed May 24 11:12:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mariusz Tkaczyk X-Patchwork-Id: 9787 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2770192vqo; Wed, 24 May 2023 04:26:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4P15KeCmLfz2QQwfiovTC6Yg0k4qqqZOziOw2WJOZ0WKo6INm3rcaZZ/oRb8bGo9Bcl/rt X-Received: by 2002:a17:90a:6641:b0:24d:dcbb:6307 with SMTP id f1-20020a17090a664100b0024ddcbb6307mr18488995pjm.6.1684927581207; Wed, 24 May 2023 04:26:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684927581; cv=none; d=google.com; s=arc-20160816; b=LdjqxS1Z5z4e7aPm2yaTwcjxeRCHUAlX1vvXSoZcSTN/hMhoS5/UhU3cC2MLJJerv5 2+hQeb0iUyVL5lPAMWmu8FMwHn7rFbKCj+DCwYanLDepxPgamWN5UVXSv89WIhw/UsZ4 w8QSUx4KwpQfmzis9Kkzc/9Y+ksJeWgjA/IEh+mvJirMprmSPVR5OPYoHQ+vj3G2NdKO smYXGMXguflpjYDBX8B01PHCaT6FWsQiYzZAzt3738n/ADBwwsB7/fGWwhxjMMmXF199 ku9cVBz2kHA3eB8BkJwnwkpl6d//8aeYqKDHuoREOoxZUIP3/tYikCTeVIhnW84g8f/3 xxEA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=0oaf2fm26ZYb2mdk+Yk4KEKeVuRSWUXRPG0g52f3mkM=; b=vJyMsNydOQIqkRyp6m5Ba6yjKazPDyY090EJcEmaaBU8ajBS+gBDv8yv4q0huvl/od WIsuVczKuZ2jDp78yTyt5s0nD0bJxAqJGNmB7egxfC/TU73GPUw9805egPmdz5vGWf+c lnXUmCrKtJtDq6GhVhAt6/B/Mx27OeDAZgMRq65XdwO+HlnLrKGv9J+phA2u6BK+B9i/ sQj7xp/dNxqUCkOxANViSTz/5P74+tb9+iJnqo40+ZatSTzx9D1I34Fum9/rFxjt6d3Z ouSE3mEN9okw5tmge2yFCVoms9YEzBj9HlzORtzgTdTuztJP7BUEcT6tBI8Wn+Un8Nyp eG/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TD7b68ki; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v6-20020a17090ac90600b002535ce9f084si1131303pjt.69.2023.05.24.04.26.05; Wed, 24 May 2023 04:26:21 -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=TD7b68ki; 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 S229491AbjEXLNV (ORCPT + 99 others); Wed, 24 May 2023 07:13:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234659AbjEXLNU (ORCPT ); Wed, 24 May 2023 07:13:20 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25686C5 for ; Wed, 24 May 2023 04:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684926799; x=1716462799; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Ctt2eux1S87Z+c64wTXFiMIMoUTvj2hM+36xZWgj04A=; b=TD7b68kijetsynfVpx/tInhLmKMVLZtM5BHtdf0bbhyYkkI6UjOAs9Ek fSPdhdqW234afj/b4D/iEDz48gcPmrenReagHmObm8JHL6HL4zLDwvuzK 1adsC0cv33tnoMfWxmvG1kMOSLNphO8y3rSVLj8JwZuif5F1HCdTP1egw nQptmrkLujfEfNFgMxJrfofdlK6dmnnUghVKxJTAfjDalzujl6ymiDlaE 8t1RdHj61XNNUXsZsi8BQOBQ2iTOoGMvLIFNECUlgbPtP8Oi0rjaWYWlq bXuouuGo4lPSjixDveXKt2ly73IBL/bn5lY51m9cffrUSvScv4iVFBgEd w==; X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="333156259" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="333156259" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2023 04:12:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="878621121" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="878621121" Received: from mtkaczyk-devel.igk.intel.com ([10.102.105.40]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2023 04:12:55 -0700 From: Mariusz Tkaczyk To: arnd@arndb.de Cc: andriy.shevchenko@intel.com, linux-kernel@vger.kernel.org, dan.j.williams@intel.com Subject: [PATCH v2 0/2] Enclosure interface cleanups Date: Wed, 24 May 2023 13:12:29 +0200 Message-Id: <20230524111231.14506-1-mariusz.tkaczyk@linux.intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766774623507836189?= X-GMAIL-MSGID: =?utf-8?q?1766774623507836189?= Hi Arnd, While looking into adding Native PCIE Enclosure Management (NPEM) support behind the existing enclosure ABI, I noticed a few opportunities for cleanups. Changes since v1[1] + internal review: - Keep reporting the cached version of ecomp->active (Dan). - Preserve cached values in ecomp, drop patch 2 (Dan). - Add comment documenting cached ecomp->active (Dan). - Move ATTRS macros close to appropriate _show and _store functions (Andy). [1] https://lore.kernel.org/linux-pci/20221117163407.28472-1-mariusz.tkaczyk@linux.intel.com/ Mariusz Tkaczyk (2): misc: enclosure: remove get_active callback misc: enclosure: update sysfs api drivers/misc/enclosure.c | 84 ++++++++++++++++++--------------------- include/linux/enclosure.h | 2 - 2 files changed, 39 insertions(+), 47 deletions(-)