Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp274532pxb; Thu, 20 Jan 2022 13:15:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWAfBlgDQhFUoYlFcfmjmn6BehpxNwSL5RKN5x6Ck1isHETwEqNikEC4KMDAFTPgDP8NG4 X-Received: by 2002:a17:902:bd87:b0:14a:c392:20d1 with SMTP id q7-20020a170902bd8700b0014ac39220d1mr583253pls.152.1642713302267; Thu, 20 Jan 2022 13:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642713302; cv=none; d=google.com; s=arc-20160816; b=F5DyOSX+AAAvHQV8dY6PkU86jgIaWs0Hn4kR0DBLu94sTMuPSvySVoWn6v53Bf4wZj 79qCaioOcbkCtR84txdthWbjkf2hE8qWpgRQQJrwmNVJud8oG0K6Bm40b2gEbTmx7Yrj z5VIHN9fbhIqyxkjLIixJd2MRi4K+7kQoAJA9PE6yKUXumuMgQwNJ9FLuv4/u27v/EU9 x55Unx52mChODnsMOPnMYXsQMmFql0vyO9rzS7XsnFH+M8DnJDo+KMkEtjQ5akzVDvCi zYIJe1OB5+isvjB/L+FfwG3MdljPtfoEJanUVh1YP1xw2eBdzaqMD0lU5uRfctTz79au hM5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JwMZ6RaFhIOsl/j7nKc8OsO6t6fJwuDF9CIxLBNGjuc=; b=wfSJOT+9+TXGa1e4QOck+fjO0A/Z99NyNNVGhI8LWWasiRT9KWcy3g5yETWWhb+yDh IgRCROHP9xDas6Y4z7r8p6bAuqUpRceWZIZxSARAJ8vA2JsKCY8DJliUpsKssghdtJCJ 8nY13zF9w40JOLRrHakw43GCOKRANRvXFR6RCTi8A/IocGdgBgyL2h5lC1l06Ngav5g+ yMlLCjwWyllSzr5jznSCRpQvfD9KRMD2wy143uksg4WqrFPBcrgQATEmPq7o/kNFaB2d 9QInV7R8McxaUhzkfCVcqOaiPPGc35lEpWvemgFLHqx65wDDyIMOGMZh6c+eePvhbxu3 Wq3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SDAHsNvH; 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 b7si4095734pff.301.2022.01.20.13.14.50; Thu, 20 Jan 2022 13:15:02 -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=SDAHsNvH; 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 S1347494AbiARRmH (ORCPT + 99 others); Tue, 18 Jan 2022 12:42:07 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:56810 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244165AbiARRmD (ORCPT ); Tue, 18 Jan 2022 12:42:03 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4EA806123D; Tue, 18 Jan 2022 17:42:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0139C340E0; Tue, 18 Jan 2022 17:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642527722; bh=CYMf003Iq/DrB18YGBUbDhdfRptl/QHoELPBspzPY7g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SDAHsNvHKIL5MrFk6hUQlGQ+57uSdI0u/bXYS+ec4ftE3YAfTtm03vh7VpulHKiIV fYjI6A/pOsXocYll8WrB99SUAK8pWHwBQvdKeIy1XzFW9WAPugU/SLfRPCQU/mRDc9 NoiZhDKxOnigysHXdYM898eLeW7FpEMfO9Kdp3lmZ6FPvkrdJCwp+VmOrFPE1AwyyA OzlC6Dfx1OUP68E6+eu9UErYNcPAE0e10av/qn001rmZCC9z2X1NmrX5Gc+Yr8pDQP HDxe06P2nKBMQkQimDuHNA2XXLYb5DEnEOiILjQcoPXK8dU66XEABJ5HXmtjHEd4Sk jiDDTULeNMHbw== Date: Tue, 18 Jan 2022 17:41:57 +0000 From: Mark Brown To: Li-hao Kuo Cc: p.zabel@pengutronix.de, andyshevchenko@gmail.com, robh+dt@kernel.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, wells.lu@sunplus.com, lh.kuo@sunplus.com Subject: Re: [PATCH v6 1/2] spi: Add spi driver for Sunplus SP7021 Message-ID: References: <37998e515d561e762ee30d0ac4fca25a948e0c5c.1642494310.git.lhjeff911@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cWj0J1tk77zuAC0Y" Content-Disposition: inline In-Reply-To: <37998e515d561e762ee30d0ac4fca25a948e0c5c.1642494310.git.lhjeff911@gmail.com> X-Cookie: Do YOU have redeeming social value? Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --cWj0J1tk77zuAC0Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jan 18, 2022 at 04:42:38PM +0800, Li-hao Kuo wrote: Looks mostly good - a couple of small nits below but nothing major. > +static int sp7021_spi_master_transfer_one(struct spi_controller *ctlr, struct spi_device *spi, > + struct spi_transfer *xfer) > +{ > + for (i = 0; i <= xfer_cnt; i++) { > + mutex_lock(&pspim->buf_lock); This lock is redundant: it is only ever held in this function which is guaranteed by the core to never be called twice concurrently. > + ret = devm_request_irq(dev, pspim->m_irq, sp7021_spi_master_irq, > + IRQF_TRIGGER_RISING, pdev->name, pspim); > + if (ret) > + return ret; > + > + ret = devm_request_irq(dev, pspim->s_irq, sp7021_spi_slave_irq, > + IRQF_TRIGGER_RISING, pdev->name, pspim); > + if (ret) > + return ret; Are you sure the driver is ready to handle interrupts without any of the other resources? Normally interrupts are one of the last things to be requested. --cWj0J1tk77zuAC0Y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmHm++QACgkQJNaLcl1U h9AloQf/R9CmVeZkSoLiD5F1sjADwvC/s2mKlTHBm2WFheDAynPMLNrjKPMziv4c 9cbnuUMl8AIIX/G9B/XrE3htb9F4vOojNd9+uLyWbFuQlNwSFlNh0cqAnbg86r0U hR74iH/g8JUN50VZrGGbYrvHv1T1tgI8LCXgMt9MaS1QBNiItnPhgTBy+VslAZS4 lt3iBzyD6mN0yrVlfWVlBHyYjjYq2EU5Zj0DOSCQ9ywT35KNCH26nUtjqPt8qdpa hoDZ/vVbNxSMLKf2wZuADpm1JL9tSzlPmyER83CjNabeLrtZcuW2WDR5chtDZ06T 3ao2LoKq9N19CXXMB/lMypwT6cwkHw== =2Z0W -----END PGP SIGNATURE----- --cWj0J1tk77zuAC0Y--