Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp205963rdg; Thu, 12 Oct 2023 03:24:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDmCZqrtyRoApIWoGI2U7EVbgljwvBqFES4U6X4n3D2P4hCz4cGdVamxyUkkhBG4AN9oAQ X-Received: by 2002:a05:6a20:8408:b0:14d:2b8d:d62f with SMTP id c8-20020a056a20840800b0014d2b8dd62fmr31332551pzd.47.1697106260714; Thu, 12 Oct 2023 03:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697106260; cv=none; d=google.com; s=arc-20160816; b=zHkEvqXKiIHeBtSYchutrJNubX4fwBTByfV8haz8wkaxKfzXHW6Ij/cpYJk4ko/ZSL CrrILM2c33Zw5k5rqjIqwf9ad3CkABCs++dD12hY986Nk8ewPXEyzxLpeqi9vYBUTl74 ronzuWI1BEKgWS7LuIkS9GupeSJMYUzW5+rENVBNPwuUGwcfzi7lmUe69thmJOrIxbkp VDNP6TFmrp+1fa4hhWZGBTQGTURwpZkYePqldEzJulNq0K6NI2f+VycqoSc+iXgeUyaH Wr5sVs6C0BBSqUWBJ3Ms1+G34ejPyw+hQJmiBPEXHwK7Y89EzwRtbS4OttPli57jC5NA xyaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=y+ft+0lMUl1MMo3X63wmI3Qc3RVHYAwyEd1fTyR5rL0=; fh=xUtS4Ye9bvz4mnbfL9bwsYffunq5fde5WqM/qGGhhDQ=; b=wK8F1KMZZTfmAGZKsoWGEgTw5QOFsUAI1PQNt7W7wAo/NlgLWmZiqoxPDXff8RUfXb VHn2FrjNWfnb9oDaCnRwRt+S9Ee+r6HpC1BA++0F9QgL6JdiiuftFmiWleLTnnxKfTBH KdWSoSfxtukwIoLe/5VxUYUDlRhsVFbH5ZS5uEEQaTp/zeLuczjC8xQWpE2yYkpk9cAz a50nfu70+4kbKdZPQEeh9xr6iKVm4P0ZLgGI5jW2CcJijLHyp6gPetAlPdV0x+3vnjrX TiPtOZmcKsv2vcb6KoXIR5716JAIoVaPjCxWw+KItrPPdccAqT+Y0XbjfqXXJSPsS0ER rOxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b="OOe/SE0w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id t71-20020a63814a000000b00578e7a37c45si2007511pgd.10.2023.10.12.03.24.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 03:24:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b="OOe/SE0w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A68FE8257E22; Thu, 12 Oct 2023 03:24:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377807AbjJLKYB (ORCPT + 99 others); Thu, 12 Oct 2023 06:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347116AbjJLKXw (ORCPT ); Thu, 12 Oct 2023 06:23:52 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87BD9CF; Thu, 12 Oct 2023 03:23:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1697106227; bh=77/5kGZDvjmKJEmjKc9G1sLtjI9zG6J4vpqdH8+SQGY=; h=From:Subject:Date:To:Cc:From; b=OOe/SE0wShL27Fslgwqvy93fVw7awrnvU8D2bkkXFq/r+co5D3qEk9HKsY2e29q6Y TqhR6mGFrEcKshNAL4P+wEky9sOiuLjM6p8RWDXzzX7HcR5p7ZCoF0VO7y3RXbeIqf fDFuHGiU9pjynsOOHYjQgI0cuqKfGvzUSPxixZFA= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Subject: [PATCH 0/4] HID: remove #ifdef CONFIG_PM Date: Thu, 12 Oct 2023 12:23:37 +0200 Message-Id: <20231012-hid-pm_ptr-v1-0-0a71531ca93b@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIACnJJ2UC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI2NDA0Mj3YzMFN2C3PiCkiLdVCPLxCTT1FTz5FRzJaCGgqLUtMwKsGHRsbW 1AKVsz9VcAAAA To: Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1697106226; l=1006; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=77/5kGZDvjmKJEmjKc9G1sLtjI9zG6J4vpqdH8+SQGY=; b=ovkq4dcnyDQcOqGDKIT5r4EQk2ywTf9xcY8S7c8/L061zmU/czps+DfP99Ls6+uwKg8Q6ZEDn TvD2u8RI2ehCRk5yIato/BSXdwSt0WW88Wk6jJLklbHIP3tOPqtuiYa X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 12 Oct 2023 03:24:18 -0700 (PDT) Through the usage of pm_ptr() the CONFIG_PM-dependent code will always be compiled, protecting against bitrot. The linker will then garbage-collect the unused function avoiding any overhead. This series only converts three users of CONFIG_PM in drivers/hid/ but most of the others should be convertible, too. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (4): HID: core: remove #ifdef CONFIG_PM from hid_driver HID: usbhid: remove #ifdef CONFIG_PM HID: multitouch: remove #ifdef CONFIG_PM HID: rmi: remove #ifdef CONFIG_PM drivers/hid/hid-multitouch.c | 10 +++------- drivers/hid/hid-rmi.c | 10 +++------- drivers/hid/usbhid/hid-core.c | 11 +++-------- include/linux/hid.h | 4 ++-- 4 files changed, 11 insertions(+), 24 deletions(-) --- base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d change-id: 20231012-hid-pm_ptr-e29ab5ee7ce7 Best regards, -- Thomas Weißschuh