Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1443279pxb; Wed, 12 Jan 2022 15:05:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYTTMomPBMlugenG6OrGW2EDetmUr/ko54QBD+GnT1Y9pnCrTT+3Q5MDVT3a8nAT4/l6HI X-Received: by 2002:a17:90a:458d:: with SMTP id v13mr11156787pjg.202.1642028755992; Wed, 12 Jan 2022 15:05:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642028755; cv=none; d=google.com; s=arc-20160816; b=WvgEVyrGEaKDHmphGDD3QgNaB50bBa2eS0vuaQ25ISGTFN8OjVf/6bAYnVgMNWR9Iw Z9cHJ0A3VHQgP6tj/UV1IwaQEo8oKIT0TpSFY7PoBXrQcEe6DvLCfLORi9JxhpzQPGu0 +Ajcc0zvzYcVDwv8Eklhw2gUpXIKyHW3/eRaXjCMM0dt/+x46xKm93pSbJtfQaWDPurc jWtxe2Zy7rMAx64tGKUPxUhoHYzBwFkNDE/OcEq+AS0D8aNH1i/LngNa+FEMuhqqtho7 LHlxLBgb4PwDhPp+K2d4QoS/qBIozWNhNqZmG431S6t3AsisglpDSDizWrwsiP83KLLp hzww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=E2MAG4AHMGQHG863+E887RLcd/UIcmQfxeFjqWbaObc=; b=KaNGKAyFnjVlfSRBda/Nc4xz00UYC3iXuwcpOjfRZ6BWQGJPokjjhF/gc7zT9tqHfR eETwC6gD7uqRLEF/FsDPcfWD8Kxk6KUG2vKDi6fYC6XQ+YXh6CFaI91FtF7nltTotoj1 Vltv9SWueRWZu4k/BD5aDLwnsc2YtRsDA5QOmoRbIUIXLCa2uW0zZ23fewzC+eVcVywY eWokrJ/G2m+bA1UUWv9AB+kgXJs8ipuZ5UnCLy9nypcn9N5evoW3Se1WyddRtT56UokV hDg6ofCRIq+2pD/JYUkIX61JIQxsvOZdVYzednW+QK+dxneJDABLYFiuNN828fe/FsiW f0AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DQMxxxnM; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l8si1247196pfc.69.2022.01.12.15.05.47; Wed, 12 Jan 2022 15:05:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DQMxxxnM; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352944AbiALLnh (ORCPT + 71 others); Wed, 12 Jan 2022 06:43:37 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:57320 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239294AbiALLng (ORCPT ); Wed, 12 Jan 2022 06:43:36 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D466A6164C; Wed, 12 Jan 2022 11:43:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C3E9C36AE9; Wed, 12 Jan 2022 11:43:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641987815; bh=nNZvPmLCj5hUY/EAI5dVhxfi/PBGWTo2PlQBAzZcUlo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DQMxxxnMGBy6NVEsiApsuYJBAUBJcIKybBu8A/KI9r+NnkFEzT8nLBqev2dR7t6PU FHzCaqUwApBvErP/Kwh9/Nh0vYxKUdVEywsTsxCJlmC6AIWzQuDOPnUVf+MUsc/dHs 5OMJ7R6ucqR6jmV5GargzvvkdW+ZWPz0W5ksFxlqB8q5HIF6ZSWnEAAy30d1uTLXhe /RsA4Idg/f69O5iCf67aYoj6Px8mf/9h80vETZUjfBpTfEAwTIoGonqXRBa3AoBQlN O6qJBnSGAhs743Y1SmfwVgltsjL6ZVkizQOPlSW+juG4T8Z6WsC8waCLm75Ckvtx8L u5PuHNHhgZubg== Received: by pali.im (Postfix) id ADF7E768; Wed, 12 Jan 2022 12:43:32 +0100 (CET) Date: Wed, 12 Jan 2022 12:43:32 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: =?utf-8?B?SsOpcsO0bWU=?= Pouiller Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "David S . Miller" , devicetree@vger.kernel.org, Rob Herring , linux-mmc@vger.kernel.org, Ulf Hansson Subject: Re: [PATCH v9 08/24] wfx: add bus_sdio.c Message-ID: <20220112114332.jadw527pe7r2j4vv@pali> References: <20220111171424.862764-1-Jerome.Pouiller@silabs.com> <20220111171424.862764-9-Jerome.Pouiller@silabs.com> <20220112105859.u4j76o7cpsr4znmb@pali> <42104281.b1Mx7tgHyx@pc-42> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <42104281.b1Mx7tgHyx@pc-42> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wednesday 12 January 2022 12:18:58 Jérôme Pouiller wrote: > On Wednesday 12 January 2022 11:58:59 CET Pali Rohár wrote: > > On Tuesday 11 January 2022 18:14:08 Jerome Pouiller wrote: > > > +static const struct sdio_device_id wfx_sdio_ids[] = { > > > + { SDIO_DEVICE(SDIO_VENDOR_ID_SILABS, SDIO_DEVICE_ID_SILABS_WF200) }, > > > + { }, > > > +}; > > > > Hello! Is this table still required? > > As far as I understand, if the driver does not provide an id_table, the > probe function won't be never called (see sdio_match_device()). > > Since, we rely on the device tree, we could replace SDIO_VENDOR_ID_SILABS > and SDIO_DEVICE_ID_SILABS_WF200 by SDIO_ANY_ID. However, it does not hurt > to add an extra filter here. Now when this particular id is not required, I'm thinking if it is still required and it is a good idea to define these SDIO_VENDOR_ID_SILABS macros into kernel include files. As it would mean that other broken SDIO devices could define these bogus numbers too... And having them in common kernel includes files can cause issues... e.g. other developers could think that it is correct to use them as they are defined in common header files. But as these numbers are not reliable (other broken cards may have same ids as wf200) and their usage may cause issues in future. Ulf, any opinion? Btw, is there any project which maintains SDIO ids, like there is pci-ids.ucw.cz for PCI or www.linux-usb.org/usb-ids.html for USB? > > > +MODULE_DEVICE_TABLE(sdio, wfx_sdio_ids); > > > + > > > +struct sdio_driver wfx_sdio_driver = { > > > + .name = "wfx-sdio", > > > + .id_table = wfx_sdio_ids, > > > + .probe = wfx_sdio_probe, > > > + .remove = wfx_sdio_remove, > > > + .drv = { > > > + .owner = THIS_MODULE, > > > + .of_match_table = wfx_sdio_of_match, > > > + } > > > +}; > > > -- > > > 2.34.1 > > > > > > > > -- > Jérôme Pouiller > > >