Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6492836rwb; Mon, 14 Nov 2022 22:13:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf5srcFX7C/QasE3oXpCo7B+hTwFvX+rC9Y/2dft/C6fI6bY+n+5xKOGYBYDlA4BYnqjheAY X-Received: by 2002:a62:16cb:0:b0:56d:60bc:7ec6 with SMTP id 194-20020a6216cb000000b0056d60bc7ec6mr16875749pfw.70.1668492794310; Mon, 14 Nov 2022 22:13:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668492794; cv=none; d=google.com; s=arc-20160816; b=cQeHzYx+CQ6574vE6tOzqNNvOJphRuxOQHmRpaoHzYCbl2TMzbtXqZnMXULFLUn4cu YJQfusTwNPJAgEhQhkVc7Y+sF15uqSs/1JUJUYlQU/LsetN4OxDokx3K2zNivhqZOgx0 s3qb9YEjjPlMf2rLkeq9rvaP0fVwLWB/TDy+E+HXfxtVTAcXgJxcCsbI/r16vMLUtRex fpYPyA4Wk9j1uApB1PKg/Jp2NqxHgytwiff99iJKWgfBXDuEowElR6AkDk2ur5oOpMLw j0Upr602yZoOF67++t6n8mavbquHrCCMFKaV5ptonnspsyUKYBULTF0qftKYNAU9lPM5 nUxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uQqRcNAhAHU0MAvKQcalM3RhDD2z13gHm2Bk2z14Kqk=; b=VenY1NiEnopmNo9vFr61o42CYmCa+h4zlZJhppr/a7RIYtqdpXP4G8TbFlX6xZwpC4 YkZXjlPT06D5KAs2qRoiTl2hG+L1cGltBQ/Jps7nxrNK7l3NE76MdaiQc1jr3+JIfb9q DtxiwE1ER948agF/C+f/veyl6CZgB71U4AZ6pfrI+eli0h2yV1Qa7CYFWy/F5pPV/3cL ZIX9TzOsUUZo4r1UzWU4UJ1KmvdxMELFyyTXEhJWtRropkcqCgSqNBSC951CsCuusx/Y 6NCpamOXZEHzj/QfRaP5UvqLgZzd67F7o55NB3U5EAlul8ihtU5uSRyU9AZpqygYRxK2 b0PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Yl2cAdhA; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n36-20020a635924000000b004597ddac21csi12352101pgb.80.2022.11.14.22.12.39; Mon, 14 Nov 2022 22:13:14 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=Yl2cAdhA; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232151AbiKOFlj (ORCPT + 88 others); Tue, 15 Nov 2022 00:41:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232147AbiKOFlh (ORCPT ); Tue, 15 Nov 2022 00:41:37 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE5561E72C; Mon, 14 Nov 2022 21:41:36 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id b21so12175150plc.9; Mon, 14 Nov 2022 21:41:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=uQqRcNAhAHU0MAvKQcalM3RhDD2z13gHm2Bk2z14Kqk=; b=Yl2cAdhASFvQ+i7S/0GXfWmFFAtErap+Ahnjq6U5qiEBlY2F3G4GfUSfkz64Itn3Pf HgMHmuwQcqz8SE0fNmQSA25iISSEW3/UBgDcfwZEaY7f/CKOIvCdE6ql8fLfgKCA+bRv PiJ0Zqh29x4/wcLoZkulGZzzWcUXNbuO0O6L0aCuz2hiqDN3YE8A2foEcYN5sPxy19da Innx1z+OHUCmfbagjWYP1I3dV0Gd3bIVrGqlSuD4SCGixplofbWlxcTabaNd2tdlNitA CtKRBvWLHdj/FgW7DW+JxpRr69FY+sfokw4J1kaMWheDqDSN/v6YAPwnCbM36eGcU/VC TElA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uQqRcNAhAHU0MAvKQcalM3RhDD2z13gHm2Bk2z14Kqk=; b=VZYkgc5lMGAtxWTK4MfJhwvv8qgE8MxsHmK20NVMFaKhcYLCXqUNy65Qm7uUL96zrf ISZQHMV2fj87By5L4DvoneBs36JX/aHI4kKUhm6N6jlIc0+e0Mw4WWwwRLej+uYX75eS bsJqD/FKxo49mxf+NR383bcBR9SGdZYh/L9OZTzhxiJergcyjZMFt9TXcesj5Ln4VH8F 59NuU+QYIELB5k2U4vcU1PUrziSLoq3FHHyInVIRVGQi7N+uviQ+SSlXY87g1YruvwvE vy2G5WrAzttY2ETz36TGv56e2ggt6Zyt3ZGyimIqrsgKykyYfuKvBUcNmlPr9/h9CmtM VDsw== X-Gm-Message-State: ANoB5pkWwBfCedhx6P+KhWQOet2WLI9U7AowRfwRnSQS9+De8XB89GBc YLeC/JcKqBRjKyjk6cUo3jg= X-Received: by 2002:a17:903:1306:b0:17f:7771:dde1 with SMTP id iy6-20020a170903130600b0017f7771dde1mr2574608plb.125.1668490895736; Mon, 14 Nov 2022 21:41:35 -0800 (PST) Received: from google.com ([2620:15c:9d:2:718:95ee:2678:497]) by smtp.gmail.com with ESMTPSA id sc17-20020a17090b511100b0021828120643sm4897281pjb.45.2022.11.14.21.41.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 21:41:35 -0800 (PST) Date: Mon, 14 Nov 2022 21:41:31 -0800 From: Dmitry Torokhov To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Benjamin Herrenschmidt , Franz Sirl , linux-input@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] macintosh/mac_hid.c: don't load by default Message-ID: References: <20221113033022.2639-1-linux@weissschuh.net> <9255deb3-6c66-444d-940d-77e721d950e5@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On Tue, Nov 15, 2022 at 04:07:53AM +0100, Thomas Wei?schuh wrote: > On 2022-11-14 16:16-0800, Dmitry Torokhov wrote: > > On Tue, Nov 15, 2022 at 12:54:41AM +0100, Thomas Wei?schuh wrote: > >> Cc Franz who wrote the driver originally. > >> (I hope I got the correct one) > >> > >> Hi Dmitry, > >> > >> On 2022-11-14 10:33-0800, Dmitry Torokhov wrote: > >>> On Sun, Nov 13, 2022 at 04:30:22AM +0100, Thomas Wei?schuh wrote: > >>>> There should be no need to automatically load this driver on *all* > >>>> machines with a keyboard. > >>>> > >>>> This driver is of very limited utility and has to be enabled by the user > >>>> explicitly anyway. > >>>> Furthermore its own header comment has deprecated it for 17 years. > >>> > >>> I think if someone does not need a driver they can either not enable it > >>> or blacklist it in /etc/modprobe.d/... There is no need to break > >>> module loading in the kernel. > >> > >> But nobody needs the driver as it is autoloaded in its current state. > >> Without manual configuration after loading the driver does not provide any > >> functionality. > >> > >> Furthermore the autoloading should load the driver for a specific > >> hardware/resource that it can provide additional functionality for. > >> Right now the driver loads automatically for any system that has an input > >> device with a key and then just does nothing. > >> > >> It only wastes memory and confuses users why it is loaded. > >> > >> If somebody really needs this (fringe) driver it should be on them to load it > >> it instead of everybody else having to disable it. > > > > The driver is not enabled by default, so somebody has to enable it in > > the first place. How did you end up with it? > > My distro kernel configured it to be enabled as module. Maybe you should talk to them? Which one is this? Not all distributions seem to enable it (Debian for example does not). > So people who want to use it can do so. It would be nice if the rest of us > wouldn't have to care about it. > > >> Furthermore the file has the following comment since the beginning of the git > >> history in 2005: > >> > >> Copyright (C) 2000 Franz Sirl > >> > >> This file will soon be removed in favor of an uinput userspace tool. > > > > OK, that is a separate topic, if there are no users we can remove the > > driver. Do we know if this tool ever came into existence? > > One interpretation of it is attached as "mac_hid_userspace.c". > > > What I do not want is to break the autoload for one single driver > > because somebody enabled it without intending to use and now tries to > > implement a one-off. > > Is an autoloaded driver that then does not (ever) automatically provide any > functionality not broken by definition? No because it does not result in any regression in behavior. > It was enabled by the distro. Which seems correct, because maybe somebody will > use it. > > Taken to an illogical extreme: If it is fine for modules to load automatically > even if they are not useful, why not just always load all available modules? Well, take for example a driver for a NIC. It is not really useful until you configure it by assigning an address to the interface, etc. Should we not automatically load drivers for NICs? > > > Maybe we can take the removal of the autoload as a first step of deprecation > and finally removal of the module. > To quote you: > > "I'd rather we did not promote from drivers/macintosh to other platforms, > but rather removed it. The same functionality can be done from > userspace." [0] I think if you talk to your distro and see if they stop enabling it and offer your userspace utility as a replacement if they indeed need the functionality would be the best way of deprecating the driver. Thanks. -- Dmitry