From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AB6A50EC11 for ; Tue, 8 Sep 2026 10:26:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788863217; cv=none; b=Smkccc09ZRD6Gt4Q0WEqfRzl5vkF9d6fr14abqM2G5ZyG3Vz1Q042ossvEKhKhsr3k4duXp5SXaRyCmvpjWhIioPo2sW+B4xSCzgTWm6oc1hXO7GbW5L73Db/wqYuPtmIl0s8+7VR9KrdfYO6dlKa42TqloEYJX6T75Hl34Wav4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788863217; c=relaxed/simple; bh=NRw+ETGIsTmdeUKeknoQ0Yj1vx+B3Gy2R9aH3D5k+KM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=swgUckGItn+FvHLS/+Hv2LKQEQFdEYEFF4aG4iJEmiazLISFTeiBYwf8LWDQ08uLh7WE/oyoNsHZcJ24pUF9Ftf4XTts6cMmJXk7zL5S58/YIsG7GqekNHZKKrV5cE3GKB4Rkgn+ffu7xoXy8YPhY5AyQiID3FrSVIYdNnlMUSs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=K/XLMwxy; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="K/XLMwxy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1788863215; x=1820399215; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=NRw+ETGIsTmdeUKeknoQ0Yj1vx+B3Gy2R9aH3D5k+KM=; b=K/XLMwxyRlchtNhGAMZaxdK3O6RRyMXMh/LKjC4Xw+DWmZ93YvHlpZU2 OBcplq/TNofQJCj90yaB9G2Xe4ivIWPV2rWmp1AqtzP6H8dv/ZX/8e9at dwiIK5vWedPApuDnvGpSkI4q0Vtdj6L2pejcSTnEh4EbuIVrYty2oIJYB 8NDrq94MNlllNilGIoIuZuP78RtQmt7zG8xKWw0iIW5ji6V6XX/Tp+jHs zeURjNJIULeQJllVO+KGVANVfVZVaITHwbLTcF8q5nArsTeRhkZHjxbRH 3rrfFANTAYGHwfjlvqNnKxrRTXg+Hnmpmk3BzF1IBTNqwbOHkfit/O5Fe w==; X-CSE-ConnectionGUID: Hy/huUMtQoq7ewckBJ3Fsg== X-CSE-MsgGUID: 8ALhuIm8Qrav61ZxgwYlvw== X-IronPort-AV: E=McAfee;i="6800,10657,11899"; a="93125262" X-IronPort-AV: E=Sophos;i="6.25,268,1779174000"; d="scan'208";a="93125262" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2026 03:26:54 -0700 X-CSE-ConnectionGUID: AWLCOjaVT36BCPSmrDCMmQ== X-CSE-MsgGUID: NbW/xd5MTgKX83yqBbb0VQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,268,1779174000"; d="scan'208";a="271468162" Received: from smoticic-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.244.92]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2026 03:26:47 -0700 Date: Tue, 8 Sep 2026 13:26:44 +0300 From: Andy Shevchenko To: Inochi Amaoto Cc: Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Yixun Lan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Frank Li , Niklas Cassel , Sherry Sun , Arnd Bergmann , Christian Bruel , Krishna Chaitanya Chundru , Senchuan Zhang , Alex Elder , Xincheng Zhang , Randolph Lin , Siddharth Vadapalli , Vidya Sagar , Neil Armstrong , Danilo Krummrich , Uwe =?iso-8859-1?Q?Kleine-K=F6nig_=28The_Capable_Hub=29?= , Pengpeng Hou , Anirudh Srinivasan , Gustavo Pimentel , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, Yixun Lan , Longbin Li Subject: Re: [PATCH v5 1/6] PCI: spacemit-k1: Add device data support Message-ID: References: <20260907112606.465778-1-inochiama@gmail.com> <20260907112606.465778-2-inochiama@gmail.com> Precedence: bulk X-Mailing-List: spacemit@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260907112606.465778-2-inochiama@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Mon, Sep 07, 2026 at 07:26:00PM +0800, Inochi Amaoto wrote: > To reuse the K1 PCIe driver logic for K3 PCIe controller, add device > data to handle the K1 specific logic and make room for the incoming > logic for K3. ... > static int k1_pcie_probe(struct platform_device *pdev) > { > + const struct k1_pcie_device_data *data; > struct device *dev = &pdev->dev; > struct k1_pcie *k1; > int ret; > > + data = device_get_match_data(dev); > + if (!data) > + return -ENODEV; It's better to use -ENODATA which will help to distinguish from other ENODEV cases (which are more often to happen). > k1 = devm_kzalloc(dev, sizeof(*k1), GFP_KERNEL); > if (!k1) > return -ENOMEM; -- With Best Regards, Andy Shevchenko