Message ID | 20211222135423.62487-1-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1,1/3] spi: dln2: Propagate firmware node | expand |
On Wed, Dec 22, 2021 at 03:54:21PM +0200, Andy Shevchenko wrote:
> Propagate firmware node by using a specific API call, i.e. device_set_node().
This breaks at least an x86 allmodconfig build:
/mnt/kernel/drivers/spi/spi-dln2.c: In function 'dln2_spi_probe':
/mnt/kernel/drivers/spi/spi-dln2.c:691:32: error: implicit declaration of function 'dev_fwnode'; did you mean 'dev_of_node'? [-Werror=implicit-function-declaration]
691 | device_set_node(&master->dev, dev_fwnode(dev));
| ^~~~~~~~~~
| dev_of_node
/mnt/kernel/drivers/spi/spi-dln2.c:691:32: error: passing argument 2 of 'device_set_node' makes pointer from integer without a cast [-Werror=int-conversion]
691 | device_set_node(&master->dev, dev_fwnode(dev));
| ^~~~~~~~~~~~~~~
| |
| int
In file included from /mnt/kernel/include/linux/platform_device.h:13,
from /mnt/kernel/drivers/spi/spi-dln2.c:10:
/mnt/kernel/include/linux/device.h:854:64: note: expected 'struct fwnode_handle *' but argument is of type 'int'
854 | void device_set_node(struct device *dev, struct fwnode_handle *fwnode);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
cc1: all warnings being treated as errors
On Wed, Dec 22, 2021 at 03:31:27PM +0000, Mark Brown wrote: > On Wed, Dec 22, 2021 at 03:54:21PM +0200, Andy Shevchenko wrote: > > Propagate firmware node by using a specific API call, i.e. device_set_node(). > cc1: all warnings being treated as errors Oops, I was in full impression that I have it enabled, but no, the other two only. I'll fix this ASAP, sorry for that, I have added the configuration option.
On Wed, 22 Dec 2021 15:54:21 +0200, Andy Shevchenko wrote: > Propagate firmware node by using a specific API call, i.e. device_set_node(). > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/3] spi: dln2: Propagate firmware node commit: e6609c26b3ab71aa3ef2f7f9524a066a863a7f18 [2/3] spi: dw: Propagate firmware node commit: 27b6965ccb72e658eb2235f564a04d2775c956cf [3/3] spi: pxa2xx: Propagate firmware node commit: 12baee68b2df6847f9a26ee82f30aa5f52c6d0d2 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/drivers/spi/spi-dln2.c b/drivers/spi/spi-dln2.c index 3ff63ab82f4f..ac83b406151d 100644 --- a/drivers/spi/spi-dln2.c +++ b/drivers/spi/spi-dln2.c @@ -688,6 +688,8 @@ static int dln2_spi_probe(struct platform_device *pdev) if (!master) return -ENOMEM; + device_set_node(&master->dev, dev_fwnode(dev)); + platform_set_drvdata(pdev, master); dln2 = spi_master_get_devdata(master); @@ -699,7 +701,6 @@ static int dln2_spi_probe(struct platform_device *pdev) } dln2->master = master; - dln2->master->dev.of_node = dev->of_node; dln2->pdev = pdev; dln2->port = pdata->port; /* cs/mode can never be 0xff, so the first transfer will set them */
Propagate firmware node by using a specific API call, i.e. device_set_node(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/spi/spi-dln2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)