Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp118873rdb; Wed, 20 Dec 2023 07:45:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbK+h/uKtA8B/EO8jYyS8EoOZjEMVw/SWsGXs4noxKKhYWULFGoKHpPWmc6uguJ7yD26SE X-Received: by 2002:a0c:c782:0:b0:67a:21aa:6505 with SMTP id k2-20020a0cc782000000b0067a21aa6505mr17547200qvj.45.1703087116275; Wed, 20 Dec 2023 07:45:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703087116; cv=none; d=google.com; s=arc-20160816; b=XJpmxwU+BeP4PFJ5SaIICr8Ryg7xc7omANQmjL3zVniSdL5fGf66XjRRxZsFaU2zDk A1dyVAranpr1Ia7JowK3n+OYYnz12vLCXQ91EgUSpkjOzDY43UXhIUAmvyq6ivNJB6kA plndb0ZWzGIVtZmsP8j/hc6R78NqYw4FGOjQpD+QbqtoUpbIzS/b8MFELTDN2J19CYtl VqlxRL8UwZaCd37tyVNMPAMbblM522hHttjXNao4lTuZ2VdZahDRM9/8Dl97uR3oFhtv S+EDa3xp1BAjNwnStx1nGDJ38RaRB5ugN7TdEx0eBG5TuNJhI/Iu57Kp2K2kmhMgvtIT HnwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=vHLQRFqpCastEnd5VdYARE9b5JUyc9d7d10RJ5j9rHU=; fh=84x5k+UxKWtn9utONVmTCwEaeXEDBZb5aQPEIueE9UU=; b=NFND35JwSsXK+i7US5s94NA512cSwTHeJ6L3cWvafJ61wFNOz1NoWOnBEBZejYpapL U5GsRDHxOLUyv6HhFftRgl5Jgy2M5hSvbnmKB0uGE7NWnqJByH/33OPsaO02K58QtwPN pUBcZZTXu6lqLl3BM4jRKNgQMP+fD3myZvEVN4RW1/mzoMrrUuWhH2tnRBe8rjJ66j5z dMDiFuDAwb8v2xW0FCgn4Qe225Ssn1e63+qNU7kCYTu6cdZI8olR9xT7w+ebWu4T99YR FNWL/I774anYmuzALc57vHbfeQig/TL6XXsaIR9/qKTyDAYzR2wVnA/up5ldZPHdBLrG DcWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-7185-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7185-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vm1-20020a05620a718100b0077eced8c45fsi2668qkn.538.2023.12.20.07.45.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:45:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7185-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-7185-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7185-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E64851C22A17 for ; Wed, 20 Dec 2023 15:45:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CCC37405ED; Wed, 20 Dec 2023 15:45:01 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) (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 1CCE241235; Wed, 20 Dec 2023 15:44:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="380821613" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="380821613" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 07:44:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="894739337" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="894739337" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 07:44:56 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rFykf-00000007aga-0x2a; Wed, 20 Dec 2023 17:44:53 +0200 Date: Wed, 20 Dec 2023 17:44:52 +0200 From: Andy Shevchenko To: Hugo Villeneuve Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org, jringle@gridpoint.com, kubakici@wp.pl, phil@raspberrypi.org, bo.svangard@embeddedart.se, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Hugo Villeneuve Subject: Re: [PATCH 06/18] serial: sc16is7xx: use spi_get_device_match_data() Message-ID: References: <20231219171903.3530985-1-hugo@hugovil.com> <20231219171903.3530985-7-hugo@hugovil.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231219171903.3530985-7-hugo@hugovil.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Tue, Dec 19, 2023 at 12:18:50PM -0500, Hugo Villeneuve wrote: > From: Hugo Villeneuve > > Use preferred spi_get_device_match_data() instead of > device_get_match_data() and spi_get_device_id() to get the driver match > data. ... > + devtype = (struct sc16is7xx_devtype *)spi_get_device_match_data(spi); Nice one, but drop the casting. (Yes, make sure the assignee is const. It might require an additional change.) > + if (!devtype) { > + dev_err(&spi->dev, "Failed to match device\n"); > + return -ENODEV; return dev_err_probe(...); ? > } -- With Best Regards, Andy Shevchenko