Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5300212imm; Tue, 16 Oct 2018 08:12:43 -0700 (PDT) X-Google-Smtp-Source: ACcGV63S2FuI7PgxIi/+RvyzW7Rif9DtgIGK+7CSw9F5/aWVzJKbCUddgj7WTH5DtJcM7wpiOKOK X-Received: by 2002:aa7:8001:: with SMTP id j1-v6mr22209196pfi.73.1539702763554; Tue, 16 Oct 2018 08:12:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539702763; cv=none; d=google.com; s=arc-20160816; b=Y7UQvscYG+NR0hMhLfTJcPHrXrJGde4wTAAmmGqnx4M8OzNNxxCDjV3elG1cOlWNkb yzCfElVFxvsnMnUsOi4lfT6Ja4mlsX7sKdtDTq+fvcOGBe5cT+sUto3rCzP9gZZqUrdD OP6T3MK8Ed+5PYV9v7NE/zSixlZg34Ej9K/Ly3BqPN29x9Uy60Lb/p1tNzfbRJJQa+OW 6CObEY1SoYNKA1Fhnh+Hb/8rAII/k49apuXM6ep5YxpKQRe1VaDnmdj6ng4n2aB1rsoT bjSIlb4/pfzu/KSp+mYdPCIZ4voZvcpQw4AdkGEDiIm1d0lz9u1z2KJINXlEzlsfSgcx P1Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=QWzq7iFzuRdSl4iKivTY3UHEiHbY1ZMdnxGxnzrhSqE=; b=u6scr7nZ0KXwRYol0zpZLUqsax7TnXo0FLYOjPnfaKiZrnvh65ctQfh7LQV3V/LtQH heuuo9MRfWReMAdzcymZnNwUcD1s5Loo1GyyInEUIWuN7OmQeN4/SA79tlwRiPVTdzun aoXpZcUZAgAe8mdA3rTBqCBh9IFhrxEFgFNUnQAV0fXf1/U5PGu4NLYj7T1/i5m6c0qi sA1oHavdRsdmNIS+tpZTYTI5t1ZSg5rOgtHeTZt8JZ8uKOPOM1iDiw1YuN+JHq0cSiyG vyjftPYjkir7CD7MBmkP32iWjK1Y+uvMPNfq0RhXaFUQ1b20XyHwm9J5tXhvtoRZ5Fls 88sg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4-v6si14476286pfa.274.2018.10.16.08.12.27; Tue, 16 Oct 2018 08:12:43 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727360AbeJPXBb (ORCPT + 99 others); Tue, 16 Oct 2018 19:01:31 -0400 Received: from www381.your-server.de ([78.46.137.84]:36570 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbeJPXBb (ORCPT ); Tue, 16 Oct 2018 19:01:31 -0400 Received: from [78.46.172.2] (helo=sslproxy05.your-server.de) by www381.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1gCQzQ-0003hv-Ka; Tue, 16 Oct 2018 17:10:32 +0200 Received: from eisbaer.ursus-maritimus.org ([78.47.220.141] helo=[127.0.0.1]) by sslproxy05.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1gCQzQ-000Eji-5E; Tue, 16 Oct 2018 17:10:32 +0200 Subject: Re: [PATCH] staging: iio: ad7816: Switch to the gpio descriptor interface To: Nishad Kamdar Cc: Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com References: <20181016144623.GA9890@nishad> From: Lars-Peter Clausen Message-ID: <929c42b8-34e7-60bb-5bd4-31faf53d62c2@metafoo.de> Date: Tue, 16 Oct 2018 17:10:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181016144623.GA9890@nishad> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.100.1/25042/Tue Oct 16 15:01:23 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/16/2018 04:46 PM, Nishad Kamdar wrote: > Use the gpiod interface for rdwr_pin, convert_pin and busy_pin > instead of the deprecated old non-descriptor interface. > > Signed-off-by: Nishad Kamdar Hi, Thanks for the patch, this looks good. One thing about the error messages though. > + chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_IN); > + if (IS_ERR(chip->rdwr_pin)) { > + ret = PTR_ERR(chip->rdwr_pin); > dev_err(&spi_dev->dev, "Fail to request rdwr gpio PIN %d.\n", > - chip->rdwr_pin); > + ret); This previously showed the pin number which has now been replaced with the error code. The message doesn't make that much sense semantically anymore. Maybe replace it with something like "Failed to request rdwr GPIO: %d\n", ret > return ret;