Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1527246pxb; Fri, 22 Jan 2021 19:46:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJybze04s4zQ/mRVS+ThyoneF7gwuoiGYWrPiYdC8i9ozFiujlySffqelb+jsPkqBqqaAXWq X-Received: by 2002:a50:aac8:: with SMTP id r8mr17470edc.9.1611373618822; Fri, 22 Jan 2021 19:46:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611373618; cv=none; d=google.com; s=arc-20160816; b=iu6RHaPoG9Ghz8ozd9CBD2YG2oA7gUgoC4uGjBCcVBVw6nxBmvrsfdpxwSzkTtS+Ne JMkNn20W2ahFN9sBbA9e0o1Q4uNspIYrKZQvIJkPmCFDKFXWcGUyoy71FroF83PwJjKY xauSOV+DbgO0sv6gKS0BDsuvrlAyFtHmeduq3rGElHzgofWuYdLodQHEXtzqNUATwALI G6fdM9tnUDbDrfS9nT+Li0q8yroQY+3i66nmVZAUi4HApF9bfA0L9F8qTTGNnXbP4zZo RZdujYbYk3WgjLyTnAkNuYf426AoqvB/UVoa4/080/ufB+2Bf3vxeGuDGRCCKnLjA2O4 4X/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=T2zUOMuYBsp0xa+C63qhybgwegJ8SB3Z5I9fwiJv468=; b=QXWR1AL55jq+0IumkZTAwo2nQp7JGEp/Tu1OSNjEp98VupH8Zjx6BW49FA1ujW+ojm jRKoNqvohTVzHYfRqsRIsnYNncW9O+GsxJCY3sPfsPsYqvT+uD3phqhUMraQbZwlhq9j oukCJ5ak+WVtcgHb9uJ8YEUgPNcHF0LHgZzz7JFMb4H39tCrfotCgQc1Pt/7hl5ndU0Z ui1cf5OGSvh94vikCC0qdP0pMLl/0zDrgrXkLVv9LrHuv4KgpokXgzgBtt0S5c3OD96V G0efPSKxm4Pa/xbaU+SqWn6+B7NMKsDuL/90QQRYIA6vmgr1COXUsDPeAlHJAh2wEdHc DQtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PRYgioSs; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u22si3720879ejc.544.2021.01.22.19.46.34; Fri, 22 Jan 2021 19:46:58 -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=@chromium.org header.s=google header.b=PRYgioSs; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726722AbhAWDp5 (ORCPT + 99 others); Fri, 22 Jan 2021 22:45:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726516AbhAWDpy (ORCPT ); Fri, 22 Jan 2021 22:45:54 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF12CC061794 for ; Fri, 22 Jan 2021 19:44:32 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id q2so1620164plk.4 for ; Fri, 22 Jan 2021 19:44:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=T2zUOMuYBsp0xa+C63qhybgwegJ8SB3Z5I9fwiJv468=; b=PRYgioSsxf0GbBLKdvEOl43mw9Aiuqs/hQuhRLx2SFwqy8rX5AeKEZSZpSNxTwoOeJ t2BmPA9Zqcn6T5n9kx1zfbkdtceWlN+cpdMOxV5wUJLEpHw1VLu4hv7dC+xAXYgPzcPc cxfTSvM6ujZjysYfxhvR0FilC+Kxu3p1WY8K4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=T2zUOMuYBsp0xa+C63qhybgwegJ8SB3Z5I9fwiJv468=; b=GPNc5Q5CMod2BUI3aLz3BA6OCECcCkfLnmG+Hh9U4rjYnQt/3A3APtGZomsscQmJxc F3FWDjSf4bXHWKkcruotLT21662ub8bHz0iv9OR83XrKpzy/v94Rw9O4yAtNlJOTKshM KSBQoEqbmjRaNRszBPW6xVzCqkqbGrcoMQ8Ff/BwnGv57cjA9hASPF6fFp4XWY33M8I0 OvmCAlNTcC1eHQj3WDvNFe69tACrgDA/Hv7lWYnTPmlbmD4bjBvv8VUZbUUctipYRPsM IzHjVt8Dm/VJSr04wdS4lvE3i99YK/hcSSwCI7FZ3TR4xghm0zgQdgoS5AJSwuUX1pZp ZFVg== X-Gm-Message-State: AOAM533yuiVuMLOvN3/kB1qnrD7Lk5yQlIgkPlp1hQ58hSyxgtttXySO PX3LlGWH7hwJgrFJOAzsGdf4+Q== X-Received: by 2002:a17:902:ee11:b029:df:e6ac:c01 with SMTP id z17-20020a170902ee11b02900dfe6ac0c01mr489404plb.65.1611373472221; Fri, 22 Jan 2021 19:44:32 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:201:3e52:82ff:fe6c:83ab]) by smtp.gmail.com with ESMTPSA id gf23sm10480343pjb.42.2021.01.22.19.44.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 19:44:31 -0800 (PST) From: Stephen Boyd To: Rob Herring 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@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, Mauro Carvalho Chehab , Maxime Coquelin , Richard Leitner , Rob Herring Subject: [PATCH v2 0/6] Stop NULLifying match pointer in of_match_device() Date: Fri, 22 Jan 2021 19:44:22 -0800 Message-Id: <20210123034428.2841052-1-swboyd@chromium.org> X-Mailer: git-send-email 2.30.0.280.ga3ce27912f-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (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(-) base-commit: 19c329f6808995b142b3966301f217c831e7cf31 -- https://chromeos.dev