Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp452876pxb; Wed, 27 Jan 2021 11:48:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQPcsrkbu6cEwEW/1839jbTqOdnM0f12UEVFy6AkaJ7dxDopP7/8gUL/FV8eFMCuC8Y1/q X-Received: by 2002:a17:906:9381:: with SMTP id l1mr8402600ejx.433.1611776906121; Wed, 27 Jan 2021 11:48:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611776906; cv=none; d=google.com; s=arc-20160816; b=CbChyS7BadHriyfuHd+ulxHRG84LEG9lQj7gGAF5QVR4ZwgiQ/9GuaXE3LPbPO2Iuy V1CaS3/RXWT6RZrkakTDHBksyWSWNyFYuJVvK2l3w+i6imHWpYj6pDJJ6h3z4Zclvhzs pJXlCziTMggL+auJCMbeTNvgkucVE/vEHT8YU1gS4e/ozVI7kEZjaLWtpj6OGXoIN0jl TRVnJWo44ary6fnXVZxpAC9AJvmDRXQNRlLdQfRVLXwlw3IhUE1RGyX4/fCHF3fA0td4 Ke+wRscvsfiCILyShRG75KuZi1wFFrknqEdlBmbgdvAmBiQ6/x3z42P4vk3pZtuboJTn mFmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rzKc+TntTt5KkSy178R+iUw84/83E/8MVQy18Z4PBK4=; b=qPbH3+qtbcQaXKJBrHywvzxv2M460af77HmQc3jWBTsId9UBcRiC9d6XcltgOe3NpI F8UHdj6/76Rk30jYFc4V7/lAzGMMKJGuFyEl4yMFw6DGgDFb2ZAN1PU8UtKtFfExWh13 sjaQZ9zeN8ah+n4MJ0/lTQ0RacElbUTwfenZhqITG/XdWMKn5fA6do4U4ncKsYF4hox5 uGmM6huiYqw/kJJPXxQndJm+demVCHu1mtf5qh2AqQSNi8v6ilQR9ParyTS5/L267QjY 3+Iihsye/KdIdIXFHVsqMJRfF6W+Nfd40ARpfJSCupZQK4A3XcwCrzZ/hvK0H06LUSqb 7MHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vyv6zeCg; 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; 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 i3si1613953edn.558.2021.01.27.11.48.01; Wed, 27 Jan 2021 11:48:26 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vyv6zeCg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S317523AbhA0BD4 (ORCPT + 99 others); Tue, 26 Jan 2021 20:03:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:47448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729073AbhAZSV7 (ORCPT ); Tue, 26 Jan 2021 13:21:59 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7E859207BC; Tue, 26 Jan 2021 18:21:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611685277; bh=MXfhwHib5lhIxe0d2EionO+qD1p7JOcTGIR5T//GcjU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Vyv6zeCgPBGRmLOGE+ZvJN/iEJbaZMbXGNiKs6W7mrLLyXtdvyXRRMjhIUG4flGz0 SObPNEWXGHHwcJfUJNuiMDGYMFH/8ozn34f5YEANN+7bqYaurnkm8GG9NwrvNlziq/ O+icUTumPpIZFw8RhAofdIEpRpC2YkiAovXOWMQqJg9uQPP3e+v84gtclOugTGmOcV ++aSNFIc4sQpch4zq96vzAnzS+3zaa/mBeaevzYjYP5n9QywZGVOgMQYAiyYmOP+pZ Sq1U3Xwms5ZLaHqaPI4yniW31jcyXpj/T+SM9Ctu5ovfB008PliOds9wV4CCoDyhwc GyVUoh4d1+tyA== Received: by mail-ed1-f43.google.com with SMTP id c6so20960185ede.0; Tue, 26 Jan 2021 10:21:17 -0800 (PST) X-Gm-Message-State: AOAM531+bSa8/wfSUxTkMkqCWoYP6KAcEK0RB3tUKorghTKbVy0gruDu l16YNSHn7Vbd0RkSMdhlUX5JAJttecisG/5fnw== X-Received: by 2002:a05:6402:1751:: with SMTP id v17mr5717873edx.289.1611685276124; Tue, 26 Jan 2021 10:21:16 -0800 (PST) MIME-Version: 1.0 References: <20210123034428.2841052-1-swboyd@chromium.org> In-Reply-To: <20210123034428.2841052-1-swboyd@chromium.org> From: Rob Herring Date: Tue, 26 Jan 2021 12:21:04 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/6] Stop NULLifying match pointer in of_match_device() To: Stephen Boyd Cc: "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, Alexandre Torgue , Arnd Bergmann , "David S. Miller" , Frank Rowand , Geert Uytterhoeven , Greg Kroah-Hartman , Grygorii Strashko , Guenter Roeck , Jacopo Mondi , Jean Delvare , Jiri Slaby , Linux HWMON List , Linux Media Mailing List , linux-omap , "open list:MEDIA DRIVERS FOR RENESAS - FCP" , "open list:SERIAL DRIVERS" , Linux USB List , Mauro Carvalho Chehab , Maxime Coquelin , Richard Leitner Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 22, 2021 at 9:44 PM Stephen Boyd wrote: > > (This is a continuation of this series[1] per Rob's request. I've picked > up the acks, etc. with b4 and compile tested the patches along with an > arm64 allmodconfig build. Presumably Rob will pick these up directly.) > > of_match_device() uses of_match_ptr() to make the match table argument > NULL via the pre-processor when CONFIG_OF=n. This makes life harder for > compilers who think that match tables are never used and warn about > unused variables when CONFIG_OF=n. This series changes various callers > to use of_device_get_match_data() instead, which doesn't have this > problem, and removes the of_match_ptr() usage from of_match_device() so > that the compiler can stop complaining about unused variables. It will > do dead code elimination instead and remove the match table if it isn't > actually used. > > [1] https://lore.kernel.org/r/20191004214334.149976-1-swboyd@chromium.org > > Cc: Alexandre Torgue > Cc: Arnd Bergmann > Cc: "David S. Miller" > Cc: Frank Rowand > Cc: Geert Uytterhoeven > Cc: Greg Kroah-Hartman > Cc: Grygorii Strashko > Cc: Guenter Roeck > Cc: Jacopo Mondi > Cc: Jean Delvare > Cc: Jiri Slaby > Cc: > Cc: , > Cc: > Cc: > Cc: > Cc: > Cc: > Cc: Mauro Carvalho Chehab > Cc: Maxime Coquelin > Cc: Richard Leitner > Cc: Rob Herring > > Stephen Boyd (6): > media: renesas-ceu: Use of_device_get_match_data() > drivers: net: davinci_mdio: Use of_device_get_match_data() > serial: stm32: Use of_device_get_match_data() > usb: usb251xb: Use of_device_get_match_data() > hwmon: (lm70) Avoid undefined reference to match table > of/device: Don't NULLify match table in of_match_device() with > CONFIG_OF=n > > drivers/hwmon/lm70.c | 2 +- > drivers/media/platform/renesas-ceu.c | 2 +- > drivers/net/ethernet/ti/davinci_mdio.c | 12 ++--- > drivers/tty/serial/stm32-usart.c | 71 ++++++++++++-------------- > drivers/tty/serial/stm32-usart.h | 2 +- > drivers/usb/misc/usb251xb.c | 12 ++--- > include/linux/of_device.h | 4 +- > 7 files changed, 47 insertions(+), 58 deletions(-) Series applied. Rob