Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1830371ybl; Thu, 30 Jan 2020 06:47:36 -0800 (PST) X-Google-Smtp-Source: APXvYqxdOhVA3d4SZWkCyXn33t5/UyouKdR6f9UGlYwSyruOwWo58BW1GcQ45NMDijfNbAv4U/ZC X-Received: by 2002:a54:410e:: with SMTP id l14mr3023790oic.42.1580395656429; Thu, 30 Jan 2020 06:47:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580395656; cv=none; d=google.com; s=arc-20160816; b=KdxGc09i/JaiuItRDlTm9GDOn5T9PXJ2b7dLi10p8pfR6c8t+Djdhd4/1THBEvs4LB eZ1xNUwUDyz31OcPbI+gQ9MrVJkTFZHcRVKkaS4Z1cBFwR9N3OFUyXi3Hz56p8ivBvIi 6z4+LU8gOxkH6pMfwCM5vbh6SVT+Jm1Ulj+wkhGyWiZvU3TCYb07+8mB75JqdkRkMoUy 1apdkPXMsY5ZFVRp3WOmYPToonKxnjyWBgv+LfW5mFJy8n/WgeCAOOoI3zxpHwaEuQfv PQ+bv2oJft37be7ZIotbddCoj6hPjB8Yn71/Qc1mcd3KJuhRAsS0pPpwevcl6cmfsPOX uneA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0loDOAZkgb/MzPcIiRYHfqyYy4Oh2nhgan0J7EgYuak=; b=ZkBZfOnZmD4lLtXU9Y/eWNWRuBHoSHmKmxXQQyEHXwRSynmsen8O2uPrmSf6UEJwh4 +GG8WRY+Rb5ra5eYuokpZ8eTYwNAG9g0yMv0OUEUOpS3bppPR5oFsT+VcG8hHFCC3oAT Cku1fdN4ZE/7f75HtEmK2jzldRv/BSeJ+DdtcehTFrM/oTNSIkQ7U9kJgCQUZ+yrJlpA SpN5WRGiEATWcxhIxvJe3b2ieyzJUeb97dgTmyLNkBn11RQ9pL8M20Bdun96O+vgipLj 7bSpT8JX68Zgr+apWvE2QjWU3WXXr2WCiFwwTlos+I5C0gcjyJU/H1Ti1PBvWfCaj416 izmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si3138260otk.126.2020.01.30.06.47.23; Thu, 30 Jan 2020 06:47:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727247AbgA3OqM (ORCPT + 99 others); Thu, 30 Jan 2020 09:46:12 -0500 Received: from foss.arm.com ([217.140.110.172]:53854 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726948AbgA3OqM (ORCPT ); Thu, 30 Jan 2020 09:46:12 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BA6B81FB; Thu, 30 Jan 2020 06:46:11 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 33C943F68E; Thu, 30 Jan 2020 06:46:11 -0800 (PST) Date: Thu, 30 Jan 2020 14:46:09 +0000 From: Mark Brown To: Eddie James Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, joel@jms.id.au, andrew@aj.id.au Subject: Re: [PATCH] spi: Add FSI-attached SPI controller driver Message-ID: <20200130144609.GD6682@sirena.org.uk> References: <1580328504-436-1-git-send-email-eajames@linux.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LTeJQqWS0MN7I/qa" Content-Disposition: inline In-Reply-To: <1580328504-436-1-git-send-email-eajames@linux.ibm.com> X-Cookie: Positively no smoking. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --LTeJQqWS0MN7I/qa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 29, 2020 at 02:08:24PM -0600, Eddie James wrote: Overall this looks good, some comments below but they're all fairly minor. > +++ b/drivers/spi/spi-fsi.c > @@ -0,0 +1,547 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/* > + * Copyright (C) IBM Corporation 2020 > + */ Please make the entire comment a C++ one so things look more intentional. > + > +static int fsi_spi_data_in(u64 in, u8 *rx, int len) > +{ > + int i; > + int num_bytes = len > 8 ? 8 : len; Please write normal conditional statements to improve legibility, the ternery operator isn't really needed here. > +static int fsi_spi_reset(struct fsi_spi *ctx) > +{ > + int rc; > + > + dev_info(ctx->dev, "Resetting SPI controller.\n"); This should be lowered to dev_dbg() at most, it's not really adding anything otherwise. > +static int fsi_spi_remove(struct device *dev) > +{ > + return 0; > +} Remove empty functions, if they can safely be empty then it should be possible to omit them. > +static const struct fsi_device_id fsi_spi_ids[] = { > + { FSI_ENGID_SPI, FSI_VERSION_ANY }, > + { } > +}; This needs a MODULE_DEVICE_TABLE annotation. --LTeJQqWS0MN7I/qa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl4y7DAACgkQJNaLcl1U h9A9TAf+MkugoZ6sUpGxBfx/kkjLIYhw0zx+HOwK7LSA++HLwW76LEm+KamfSANm 7g9UhKQUdHhBs2ahWu+pZwF39cd4HgoQqCSe6iW42IUWvh5XVXlTYrDqnh3zoqYX V1NjkEDzs+50zaJIJWAMAZmQ6vZYupmDEtVO6oeAa1Q2GlhZbYgEkpLrEuXQFm35 dyfhAZTN6VICNPaUZXzZdg+5lFm7wskffv0RQhUUxo+5aPoa/o8EIEqHRb3emjvS nHcoisf9jxj8YJWkpzCJ5lOf+naaI0mENZa8k+Enbtkh8iktHNWp0tfPKmgEpMuF 4qfEnnMtc5U99fHkihfnLTy1Afzg2Q== =Hyju -----END PGP SIGNATURE----- --LTeJQqWS0MN7I/qa--