From patchwork Tue May 30 14:02:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mariusz Tkaczyk X-Patchwork-Id: 10038 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2218755vqr; Tue, 30 May 2023 07:22:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7GmfYKZ3RF11nOfQtq5bVel5po7swtWcbhG/v934OnKaEl9q12vG/o6Kf2KBkbkesi+1IE X-Received: by 2002:a17:90a:4590:b0:247:26da:5de2 with SMTP id v16-20020a17090a459000b0024726da5de2mr2602606pjg.20.1685456573398; Tue, 30 May 2023 07:22:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685456573; cv=none; d=google.com; s=arc-20160816; b=YTC1dcrAgsZaqJS8nHf//F/AaxPrgKZGgvoEFfsSTglY1C3/Zv0bFwXlabGFpF7vtK 6DAbbGKz7/8rrU/JYztjM5JXJfcJVkSZH4Y6lwVzqAu7rKtlpE6A7JRhEoHIUbrukxNz 8eEtldAcTh01wpjGOiUPW4gMAfE6oIDgP2rdYXQKXhA5KyeO6Z4DXSr1nXFFGo+0WRfq 83n2quIfMonR/Ntvpq3EBn2oAf2rWelNzLP+OpHs7RkiW1BqF8050f0XZG+TF23ShF4A XAteNlbz5/fbZrYQ4FzycXtjUpkRqIGWGEONiZ64xZulx1slsAcUdj9TowHIlOhXtnAZ JR1w== 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=s+wua5Y7ooAdJK6/OKDoaCL1UGvFA+RLW0soA/4XIho=; b=NfBDcXvj4+RZw3zHMoreA5pOx4iNSSyyW4HIPQDO4vaT9DNWDRE5GkHvEBP9xQganY Z6NEqrZ4SMr2viBT0NSf2gT3Q+j1SRLiwpk6zICoaiFbkMbjW11olnA8VPbCmDnesWdz mPLLUB+eGUA87SEwJAAlZ22Y+S6YgOeTfnSWGyR3gh5pm5SAUAC8kWgC+qiB/o+pA8MH 1t3Q29AzcHRjuJ53L6t5VSb1ymC6cmca+fcnXdjm7x2dvwAMBWCj9gs0N0JbHmrHSM2p gTkAt7xgRhXrkC4nV1/0/wzs8tAQcA3lGuRbHkabbTYo06Bp9jufqqOwR5JaXaqWkvnQ jKSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MmDODs2Z; 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 i2-20020a17090ac40200b002565804077bsi1191255pjt.32.2023.05.30.07.22.38; Tue, 30 May 2023 07:22:53 -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=MmDODs2Z; 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 S232788AbjE3OC5 (ORCPT + 99 others); Tue, 30 May 2023 10:02:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232468AbjE3OC4 (ORCPT ); Tue, 30 May 2023 10:02:56 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B045F9 for ; Tue, 30 May 2023 07:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685455375; x=1716991375; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=IuOfuFXOUK55surV0YDa1ce7uDEpvN7Huet211HYSDA=; b=MmDODs2Z53gOYb+VqILPBKaBgk/1uBEH9wedvuBMTtng5kRAxonHvz48 xmdiSXYfzy5k0lhV75QDHU4H+UijyWeS8SURbzRsKga4XGEvYUOfRipnS v7QDuxfvhDa8KfSKsFdaeK5jnyb/ckgSbKiKwZKjLwArv1KMfWsH9RQKE 9k+Y2PE9YJVOs86RYNSAZyqvs2fVhllxrtyGKCkeo/dxUB6KCDcwGHrGX ye7oawqJvRfCWkO5+rsA4kAmFqk+Y8z7mNp+KlvE53Q2aXBRUY4z703MP lRvQSgPF9UAmg1nrRZ8YTa9pvAItRAA0ljbJOW6i5oy7ItKs9vAdj7nKJ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="383179381" X-IronPort-AV: E=Sophos;i="6.00,204,1681196400"; d="scan'208";a="383179381" 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:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="953142966" X-IronPort-AV: E=Sophos;i="6.00,204,1681196400"; d="scan'208";a="953142966" 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:52 -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 0/2] Enclosure interface cleanups Date: Tue, 30 May 2023 16:02:21 +0200 Message-Id: <20230530140223.13994-1-mariusz.tkaczyk@linux.intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767329311666575850?= X-GMAIL-MSGID: =?utf-8?q?1767329311666575850?= 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). - Make comment shorter (Christoph). - Update patch2 title (Christoph). [1] https://lore.kernel.org/linux-pci/20221117163407.28472-1-mariusz.tkaczyk@linux.intel.com/ [2] https://lore.kernel.org/linux-kernel/20230524111231.14506-3-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(-)