Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp165139ybz; Thu, 16 Apr 2020 22:02:44 -0700 (PDT) X-Google-Smtp-Source: APiQypL9KyM5n5AIcCuw6NtDLiAZ5Es3T+zSomnH/Kqymaq6nXprVQh32KknToxueVrA91qg+ctJ X-Received: by 2002:a05:6402:c94:: with SMTP id cm20mr1362761edb.101.1587099764686; Thu, 16 Apr 2020 22:02:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587099764; cv=none; d=google.com; s=arc-20160816; b=C7micOnwo2ypsqhL5Eb8DhiJJuQ5kwrOO/y5EUF9efeByd46udi/8gwRWbj2fcCOB5 6vRhvVALrCgUbG34gliyYhtyhDSqUYdfUBsQ8UkSiZ2d6cr0UYPQtB7GUab/HokaU/20 /z0Uj6GcJf/Q3BRraSd56DBGdCZA/rr7L6Ig79995Fai92Dchni2QQp45Cli2JtQHEuQ N/aZmKYEX/wVpsQYArod0mgA44ydO496NEGU2dbBbn0Pi2Q+oC9gwMx9e/vWjnIDZQtq w0u0Ng1opa+EHVkyGOAGpV3aKS2mhqQKwiXs0qMv3+qmz1db4TpDjlS/oZQW4fy4Y9Yl 3dXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:organization:references:in-reply-to:date:cc:to:from :message-id; bh=6/t1HY9ZWs9tO4htamDI5EEBXY7K82jt31NiJxnCzmY=; b=lo7suVmZp+MKnexTUtfW71mchqkWS1o2UrZq7v5SsfzbonhUYFpgExsYf0cmFVsRu9 FLq4yKbX52dWeY/Qn8CSDqxYsdvLJfvajLIEdg2lSUK+JOq+gZGOmSQJsB5SrJzpEJqD mPYBOtVArEUB7NRQl15PoaU0XDBv/CCHwbCX4hOQhG8YpeKskRDR17wUkud5Q2/gzzLc zl3W6a6JZzoXjR/VnXzIKcfZddTEKVr6Lcek0U28XwZojajFvgYxJ1tk753xWNBoypJG apj9aH0K/7Ds+JH9xQGIYXOrkRSExPBv0TyPYQgZNb3epm/t5X6u3/+H47q6N7ZxfTMK 02WQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si4879728edq.326.2020.04.16.22.02.20; Thu, 16 Apr 2020 22:02:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726605AbgDQFAn (ORCPT + 99 others); Fri, 17 Apr 2020 01:00:43 -0400 Received: from baldur.buserror.net ([165.227.176.147]:39612 "EHLO baldur.buserror.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbgDQFAn (ORCPT ); Fri, 17 Apr 2020 01:00:43 -0400 Received: from [2601:449:8480:af0:12bf:48ff:fe84:c9a0] by baldur.buserror.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1jPJ5C-0001kX-AJ; Thu, 16 Apr 2020 23:58:30 -0500 Message-ID: <64bb1f056abd8bfab2befef5d1e6baec2056077f.camel@buserror.net> From: Scott Wood To: =?UTF-8?Q?=E7=8E=8B=E6=96=87=E8=99=8E?= , Rob Herring Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, christophe.leroy@c-s.fr, linuxppc-dev@lists.ozlabs.org, kernel@vivo.com Date: Thu, 16 Apr 2020 23:58:29 -0500 In-Reply-To: References: Organization: Red Hat Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2601:449:8480:af0:12bf:48ff:fe84:c9a0 X-SA-Exim-Rcpt-To: wenhu.wang@vivo.com, robh@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, christophe.leroy@c-s.fr, linuxppc-dev@lists.ozlabs.org, kernel@vivo.com X-SA-Exim-Mail-From: oss@buserror.net X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on baldur.localdomain X-Spam-Level: X-Spam-Status: No, score=-17.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -15 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -1.5 GREYLIST_ISWHITE The incoming server has been whitelisted for * this recipient and sender Subject: Re: [PATCH v4,4/4] drivers: uio: new driver for fsl_85xx_cache_sram X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on baldur.buserror.net) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-04-17 at 10:31 +0800, 王文虎 wrote: > > > On Thu, 2020-04-16 at 08:35 -0700, Wang Wenhu wrote: > > > > +#define UIO_INFO_VER "devicetree,pseudo" > > > > > > What does this mean? Changing a number into a non-obvious string (Why > > > "pseudo"? Why does the UIO user care that the config came from the > > > device > > > tree?) just to avoid setting off Greg's version number autoresponse > > > isn't > > > really helping anything. > > > > > > > +static const struct of_device_id uio_mpc85xx_l2ctlr_of_match[] = { > > > > + { .compatible = "uio,mpc85xx-cache-sram", }, > > > > Form is , and "uio" is not a vendor (and never will be). > > > > Should have been something like "fsl,mpc85xx-cache-sram-uio", and if it is > to be defined with module parameters, this would be user defined. > Anyway, , should always be used. > > > > > + {}, > > > > +}; > > > > + > > > > +static struct platform_driver uio_fsl_85xx_cache_sram = { > > > > + .probe = uio_fsl_85xx_cache_sram_probe, > > > > + .remove = uio_fsl_85xx_cache_sram_remove, > > > > + .driver = { > > > > + .name = DRIVER_NAME, > > > > + .owner = THIS_MODULE, > > > > + .of_match_table = uio_mpc85xx_l2ctlr_of_match, > > > > + }, > > > > +}; > > > > > > Greg's comment notwithstanding, I really don't think this belongs in the > > > device tree (and if I do get overruled on that point, it at least needs > > > a > > > binding document). Let me try to come up with a patch for dynamic > > > allocation. > > > > Agreed. "UIO" bindings have long been rejected. > > > > Sounds it is. And does the modification below fit well? > --- > -static const struct of_device_id uio_mpc85xx_l2ctlr_of_match[] = { > - { .compatible = "uio,mpc85xx-cache-sram", }, > - {}, > +#ifdef CONFIG_OF > +static struct of_device_id uio_fsl_85xx_cache_sram_of_match[] = { > + { /* This is filled with module_parm */ }, > + { /* Sentinel */ }, > }; > +MODULE_DEVICE_TABLE(of, uio_fsl_85xx_cache_sram_of_match); > +module_param_string(of_id, uio_fsl_85xx_cache_sram_of_match[0].compatible, > + sizeof(uio_fsl_85xx_cache_sram_of_match[0].compa > tible), 0); > +MODULE_PARM_DESC(of_id, "platform device id to be handled by cache-sram- > uio"); > +#endif No. The point is that you wouldn't be configuring this with the device tree at all. -Scott