Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp432182lqt; Thu, 6 Jun 2024 07:50:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/2J8S2SKEFsTdw0sATJXB+v2GQgblLudvdvZ0QkUy6NcAz6c6J8CiiORwIGL6+6TLAvHNaum50X8Ef72aBoLk9EzXGDcEKM1cH0C7yA== X-Google-Smtp-Source: AGHT+IHwPdJO/rd+jrX722GvQCxMkO779zHP5UvxzjDcZqexy11CTDQXWtNvpyAt+OSXjSVP07Yg X-Received: by 2002:a17:906:1d55:b0:a69:d3c:bda2 with SMTP id a640c23a62f3a-a699f561d77mr389193866b.26.1717685419362; Thu, 06 Jun 2024 07:50:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717685419; cv=pass; d=google.com; s=arc-20160816; b=LOJG8qfqxfXIMINzNISR+KfqquSlfCp/z+Hkt6/4qSQwVijrfxY0AmX/ThtloPtigA UIWkuRR0oNrb+HguJfnRDQaV0JMI4+1xz7KJUHctOjaycj4S9RIexzqPRzzqd0JI5kOO RtjAggXqcHMOfBfY1M/GLtXQ4EcbGWSaoJ3luKMuU+sqGv2wqGRuvQU8WJLApzR4ZMH/ nZChNISI874ldJu3PNJAQhXPcSlE0a4JJbnAKBUQIkbnLN9av7SNGt0yjMG89O+x5ZcI 2aBTO/U/EogvdG6DHX1EtRaTXmei3D/0ym/kSIvApx87DNLct8Ec+Si4cJJo5zCqT1AQ rb0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=s0R2FTqs9h57UOEpdGtqZQ+WmWHV210ccwRY3/zwf0g=; fh=yl2wP+0aNCWxPVlWPlqgQbc99/BR0R+A5RvfELq1WB8=; b=Qkl9+BxIeFaAvwQlVc90B2yJ9PAchkEHK8E98tMhSVvFpl95TbVp9Zhd6LqOubv9LJ +SCUWGJ9FnslJOKOxBAIYl9vTeDuESohq1iIJQGg6Eze38QydCJV8JSDkDYErvNskRxu vDFSM/C5hiUbkh4dzn6rcgqp/fFbWLDAj/rHJYP4tLSFr10LWwqD3HeenGz8tuzz6zdV Vkp/h1Tmhqn3DF/samckddUJuOj6vFfMiAe8Cdw0pw8SdSsQ9nEmdWZavbUvOTiceAi2 jCu72Yaw6HtiG1kYLdiFQcYNWiDkkae5wylF5jjU9+63Cn0O8HJRa12rXNHKlmMbhyW0 X9Ww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qsrVF80r; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204450-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204450-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c805ccf09si75772466b.255.2024.06.06.07.50.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:50:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204450-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qsrVF80r; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204450-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204450-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 171A81F25B13 for ; Thu, 6 Jun 2024 14:50:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7FDD1993A4; Thu, 6 Jun 2024 14:24:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qsrVF80r" Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 653D9196D99 for ; Thu, 6 Jun 2024 14:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683870; cv=none; b=dEddIgPOlmk+itfImaDo1k+dp+EHMtTOlUm7lhwJ5rqevxQUlKoLr5SXkowdIHTrwPfAOBA7uNXml61z+tkEHR81vwVp3U3txFJLfZmHgZPTrm/sgYxUZsuEI+siEv0ZqWCZI7Au4FoHS0l/4Ua4IwnLNsV1YnfLeHpKvJa876U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683870; c=relaxed/simple; bh=dxFGGhzrS7LrLExlJB0Xcypo/XjMKtA9vb1gGePZ7dE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=keyjKQy/75O1GnydUC7KM1qoYyoQZgDtXMgsYk3UZFpXD8Vtk6E+cWd2U5869Hjfrsh2nalK4I2bSDXRxI+r5ZFrFYrzpnIAq1esovsXIIf2IMmbJGHVVXcHQ8x9ikEiTK3wBquOQhEU5Hm6rVJHyyAuaP+s6VokNyHn/kaX650= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=qsrVF80r; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-52962423ed8so1258431e87.2 for ; Thu, 06 Jun 2024 07:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717683868; x=1718288668; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=s0R2FTqs9h57UOEpdGtqZQ+WmWHV210ccwRY3/zwf0g=; b=qsrVF80rCPEFZznlSUlCbhZn1Z4VCAEV8jySdl9wNaHolJRwkEDIP7wIV0XjE9YIS+ CgQcTr6C+e60KKYRypTvWdqhEBO/0cwuOZg9OkeyjD9mao4wTyTVxZk2j+MBhA/YHoI3 bVEBpr6JfjNXED57BcQwiGLqAZXd7f2Yzv+R0YO0giATtA8//AVpuODKaL3ksgd1Lc9Y gu0Zbsf/liwc/kozAycb/HPT0d9xu4ZC2w6mMAW4rZPg+hr3tP8c7C3tSg8q9vKMHPX9 J5BcmLTuEKXcLAZsu6pOL9m2Plw5QT80cknHl1xtcOSIhVyqqrd8MdW/JetSv+QmhK4j QFMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717683868; x=1718288668; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s0R2FTqs9h57UOEpdGtqZQ+WmWHV210ccwRY3/zwf0g=; b=C0CclNJg8Z//IamW5y/vaGcTQioHgJqNJi4I4Za/rdfQJm7WqWxqq3FDEOo4DgidBG R+Gg6PaxsqvEbEVfffIzGUL11OEK4PsZS6Hij/C+4mRWgEEQ+PB4S2LDIQ+P11jmcHJH h5RQ/aS1zBUbmRPaXxp6RnQTcI8C4lAd196ZxmVNmU1wNQ0nSw2pnf15yUN4lvgkRQeC +/7dOGg50Ra5cqDAGaLCUlKS4PutUU7G1Roz/zmY/QXraqO4NG015RrKD7G4DwHpQ23/ ITcXzOXuNOq1YPa3ul/30u4uNvw0l+9VvZKhUxe+dzlUtgfoHoPoaL4p8bKkiTQ6BET3 t3tQ== X-Forwarded-Encrypted: i=1; AJvYcCXwOBTSPKiuVsgsunHakBpSmiyo8oW+LUeMCzrbBXFnLbOXDogpbRpo6yEiC/Hxy52HsDz+Ozc9m4gS7FyYgn4zWIHa61iJqyv7Dc3w X-Gm-Message-State: AOJu0YwS7nl+bqG0h3wS6YVVWpR4DYfg+qFe/TEMCJd44AoqRasRQceV i0me1Sv+WLwDeGITu7/US+Icpaiwg0ojC9uAyEw7Owdcj2m4/D4Ecnub8pJPcfQ= X-Received: by 2002:ac2:4906:0:b0:52b:79a5:517a with SMTP id 2adb3069b0e04-52bab4e5283mr3281219e87.33.1717683867645; Thu, 06 Jun 2024 07:24:27 -0700 (PDT) Received: from krzk-bin.. ([110.93.11.116]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52bb423ceeasm211659e87.185.2024.06.06.07.24.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:24:27 -0700 (PDT) From: Krzysztof Kozlowski To: Marc Kleine-Budde , Vincent Mailhol , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manivannan Sadhasivam , Thomas Kopp , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH net-next 1/3] can: hi311x: simplify with spi_get_device_match_data() Date: Thu, 6 Jun 2024 16:24:22 +0200 Message-ID: <20240606142424.129709-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski --- drivers/net/can/spi/hi311x.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/can/spi/hi311x.c b/drivers/net/can/spi/hi311x.c index e1b8533a602e..5d2c80f05611 100644 --- a/drivers/net/can/spi/hi311x.c +++ b/drivers/net/can/spi/hi311x.c @@ -830,7 +830,6 @@ static int hi3110_can_probe(struct spi_device *spi) struct device *dev = &spi->dev; struct net_device *net; struct hi3110_priv *priv; - const void *match; struct clk *clk; u32 freq; int ret; @@ -874,11 +873,7 @@ static int hi3110_can_probe(struct spi_device *spi) CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_BERR_REPORTING; - match = device_get_match_data(dev); - if (match) - priv->model = (enum hi3110_model)(uintptr_t)match; - else - priv->model = spi_get_device_id(spi)->driver_data; + priv->model = (enum hi3110_model)spi_get_device_match_data(spi); priv->net = net; priv->clk = clk; -- 2.43.0