Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3430809imu; Mon, 28 Jan 2019 04:51:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN6TOIcqnzF87PPpJIfqVXuUi5e4FjbGFgEmYC2wktWnqpBkJp3lnLSl9vdWXOOv3wrDYNG0 X-Received: by 2002:a63:e40c:: with SMTP id a12mr19851553pgi.28.1548679905810; Mon, 28 Jan 2019 04:51:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548679905; cv=none; d=google.com; s=arc-20160816; b=xiRhtDhpRh5N1WPXYLdYMgmGofTanSe6oFN4MOjGuqPhKrG4a73YuL+R7JBs0jtlcR 0BJg9rGlSSd0YChcMRoyBLkNzbH1if0BN85mhQuTCgJ+U0+T8SUsvKjhd8uCoNJy1SXA uKEGq68sEKiMwPpQ1PWkqXrJKCtKmn2lFF2UTemfONPBDjF9FLBceJQ6H6YqzDwMye5b POkUxQgzJe/WyN+Dv77NCE7aaQOLATvk4+E+nzu9UvkQSEqdbsuUixgId+1kQVSCNenU saEB8v8AhKFU9F0ZOr16xSZBCmS2HN43Hu1jbf8obqwJH7FrDhSg7ac5rC20XkDdMS+P gmfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Xs8hcOa+dPHiJzQC/Q7BnqacJZoikilt74fJ56DRTdY=; b=rZlBdc22nBpoPwJwWKraE/GBQm1WdjtxSzglM5nFAzfq2xV/0nhLkn6Plmhr0Wc3Ci Firq/Ci08vO9GUBYY5h+XJXOoeVkq2xZ3YbfaClU1k99e91QrYfaEut+tOyHBH6kKoIR lo0VM1kgHq8oCRHSGSXngryMx+F+cGywz9HBMNEiCrOgvGUTxfFvz35/A30dBdIoMyZG tmu7YAB94wqv2UyJqbx1tUVl8hJADMCiS3Q2zRLNrDnmRX+CtuDmozZCgWZocfcNlqam +48zu8N5wqwk3hcehibzHsaGpG8AQnY9TV4O9ZZqvgnPVdT9nwf9/0ycpjVQjbF9tF63 AGnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i96si33060126plb.188.2019.01.28.04.51.30; Mon, 28 Jan 2019 04:51:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726752AbfA1MvR (ORCPT + 99 others); Mon, 28 Jan 2019 07:51:17 -0500 Received: from mleia.com ([178.79.152.223]:34294 "EHLO mail.mleia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726611AbfA1MvQ (ORCPT ); Mon, 28 Jan 2019 07:51:16 -0500 Received: from mail.mleia.com (localhost [127.0.0.1]) by mail.mleia.com (Postfix) with ESMTP id 06FFA43E303; Mon, 28 Jan 2019 12:51:14 +0000 (GMT) Subject: Re: [PATCH] pinctrl: remove unused 'pinconf-config' debugfs interface To: Linus Walleij Cc: "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Laurent Meunier , Masahiro Yamada , Russell King References: <20190120151357.11106-1-vz@mleia.com> From: Vladimir Zapolskiy Message-ID: <8f8bacae-bc90-d1c7-b2eb-6f4a03d34cc7@mleia.com> Date: Mon, 28 Jan 2019 14:51:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20190128_125114_057231_14F37254 X-CRM114-Status: GOOD ( 23.72 ) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On 01/28/2019 02:36 PM, Linus Walleij wrote: > On Sun, Jan 20, 2019 at 4:14 PM Vladimir Zapolskiy wrote: > >> The main goal of the change is to remove .pin_config_dbg_parse_modify >> callback before a driver with its support appears. So far the in-kernel >> interface did not attract any users since its introduction 5 years ago. >> >> Originally .pin_config_dbg_parse_modify callback and the associated >> 'pinconf-config' debugfs file were introduced in commit f07512e615dd >> ("pinctrl/pinconfig: add debug interface"), a short description of >> 'pinconf-config' usage for debugging can be expressed this way: >> >> Write to 'pinconf-config' (see pinconf_dbg_config_write() function): >> >> % echo -n modify $map_type $device_name $state_name $pin_name $config > \ >> /sys/kernel/debug/pinctrl/$pinctrl/pinconf-config >> >> It supposes to update a global (therefore single!) 'pinconf_dbg_conf' >> variable with an alternative setting, the arguments should match >> an existing pinconf device and some registered pinctrl mapping 'map': >> >> * $map_type is either 'config_pin' or 'config_group', it should match >> 'map->type' value of PIN_MAP_TYPE_CONFIGS_PIN or >> PIN_MAP_TYPE_CONFIGS_GROUP accordingly, >> * $device_name should match 'map->dev_name' string value, >> * $state_name should match 'map->name' string value, >> * $pin_name should match 'map->data.configs.group_or_pin' string value, >> >> If all above has matched, then $config is a new value to be set by calling >> pinconfops->pin_config_dbg_parse_modify(pctldev, config, matched_config). >> >> After a successful write into 'pinconf-config' a user can read the file >> to get information about that single modified pin configuration. >> >> The fact is .pin_config_dbg_parse_modify callback has never been defined >> in 'struct pinconf_ops' of any pinconf driver, thus an actual modification >> of a pin or group state on any present pinconf controller does not happen, >> and it declares that all related code is no more than dead code. >> >> I discovered the issue while attempting to add .pin_config_dbg_parse_modify >> support in some drivers and found that too short 'MAX_NAME_LEN' set by >> >> drivers/pinctrl/pinconf.c:372:#define MAX_NAME_LEN 15 >> >> is practically insufficient to store a regular pinctrl device name, >> which are like 'e6060000.pin-controller-sh-pfc' or pin names like >> 'MX6QDL_PAD_ENET_REF_CLK', thus it is another indicator that the code >> is barely usable, insufficiently tested and unprepossessing. >> >> Of course it might be possible to increase MAX_NAME_LEN, and then add >> .pin_config_dbg_parse_modify callbacks to the drivers, but the whole >> idea of such a limited debug option looks inviable. A more flexible >> way to functionally substitute the original approach is to implicitly >> or explicitly use pinctrl_select_state() function whenever needed. >> >> Signed-off-by: Vladimir Zapolskiy >> Cc: Laurent Meunier >> Cc: Masahiro Yamada >> Cc: Russell King > > This is fine, the build robot is complaining of some missing > prototype though, probably some implicit include that > disappeared when you removed > from the file. > > Will you send a v2 with this fixed? (I think just leaving the > include in place would be a quickfix.) > Fortunately it has been already done, please check the sent v2 with one earned Reviewed-by tag from Richard: * https://patchwork.ozlabs.org/patch/1029536/ * https://patchwork.ozlabs.org/patch/1029537/ Thank you for your approval of the change in general! -- Best wishes, Vladimir