Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp392650imm; Sat, 22 Sep 2018 02:28:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZy6QaaXBRq3zLXOrIGVl/1saNfa/wBeK3UTuBxbBoEmuKHsllQe4zAwP3ZfB3drdVuIJuh X-Received: by 2002:aa7:8087:: with SMTP id v7-v6mr1806353pff.38.1537608516791; Sat, 22 Sep 2018 02:28:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537608516; cv=none; d=google.com; s=arc-20160816; b=mE8BXCRTwqDBs9nXVrGLSE1JHfgIRPY7/JRfZm0xcBI7+cQToT+HyxUr/2rusJq4t7 j7nY8QVbvLtijy5E+aPyNgVb3GCjcLGJWjugbq42LarEKDG9ZUWK4F31Y7h2ag0uGPLC s+HJN54U6pVfLTX8/vqdyu2j+JbQe4p5bdLcVEZyEtFwIBZjZBerpB9K0XNC9NSahAdl JE8BRkHomcRlW0mDLiRVCQl9ziz00Hfj70hKNYN0bl0X3/0fdJbYl4MMXN9H+oj0q3bE Ujqo3iA4LlHVi1s1M/HidUOZrOAVrHA/oaNltSfLQM6XUbyM8XxUgyXn7DwDwQx8lwOX CArw== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=u5Hoo2E9hK1MA+nEzfBxNEZYynNpDdE9aoIyWRnTKL0=; b=mIh1kwJD/Jl51hFIIvtxUjcYR9K5vRSzwVg3e/YyCXCc8lrpfHy634v8Trg6OuDzSV DleVS1uvU0yBo/cuCUqvIfyEh7JveegWPuQyvmp2vBdByfXxBw8wluScnJheSQTiukJr 3l5ILgTwP4+fHMC/xZXarznYNdUj8zKemYZvxzJTJGovEcVbL15UmVBziMnNgn4km0Xq 5zxQSHK4tTm1VAkeMflftim/zqDel5oY2P+AyIXoghCHpfE8ey6J9jlwoWZbC6O2ZXTE /2ZRhW3JUWJxacdeevQADKYXCwnQOLm7Tn2bxzIRVtoSJLqwWMR8qGAVA/BXs6KJYZhP ubrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VqE4AFJ1; 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=pass (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 w126-v6si33244843pfb.232.2018.09.22.02.28.20; Sat, 22 Sep 2018 02:28:36 -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; dkim=pass header.i=@kernel.org header.s=default header.b=VqE4AFJ1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727387AbeIVPVJ (ORCPT + 99 others); Sat, 22 Sep 2018 11:21:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:53528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725874AbeIVPVJ (ORCPT ); Sat, 22 Sep 2018 11:21:09 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D72D02154C; Sat, 22 Sep 2018 09:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1537608495; bh=CyGgdtu7G1ULIEddWbSkTUE9kGAiHS/RHJGjMhf3iHk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VqE4AFJ1yWprEDavpFDUpL4QzHK6fmAnB9c12mXUtD5VyrlanU6D+MS+tLVZmG2Gj aKSxhEknB+MpD0pdzgaeAyTtukwb7LL648VDTMJ1CduS1MbBby5e/6Qn5NRlawjvsx KzFWi2PYCuOGxc/z7J4qBTdWXG3j+DQnvXf/3D00= Date: Sat, 22 Sep 2018 10:28:11 +0100 From: Jonathan Cameron To: Song Qiang Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, shubhrajyoti@ti.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: magnetometer: hmc5843: Replace a return value. Message-ID: <20180922102811.7ad29532@archlinux> In-Reply-To: <20180920134219.8402-1-songqiang1304521@gmail.com> References: <20180920134219.8402-1-songqiang1304521@gmail.com> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Sep 2018 21:42:19 +0800 Song Qiang wrote: > This error apparently is caused by timed out event, so a -ETIMEDOUT > should be used instead of a -EIO, and it also tells user what happened > , so this dev_err may not be needed anymore. > > Signed-off-by: Song Qiang > --- > I used ./scripts/get_maintainer.pl to get maintainers about this file, > I thought this script searches maintainers with looking up MAINTAINER, > is that right? > So I searched MAINTAINER and also found nothing related to hmc5843. > In the declearation area I can see Shubhrajyoti Datta > wroted this driver and several other people > including Peter Meerwald have contributed. Is this driver now a orphan? > Or if it is, I think we may also need to add it to the MAINTAINER file. > I'm also familiar with this device, I think I can add interrupt support > later. Those drivers not covered by more explicit MAINTAINER entries are picked up by the main IIO one. Of course if you are working in a significant way with the driver and want to adopt it, then post a patch adding a MAINTAINERS entry and see if any of the previous significant contributors mind (or potentially want to co-maintain it). > > drivers/iio/magnetometer/hmc5843_core.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/iio/magnetometer/hmc5843_core.c b/drivers/iio/magnetometer/hmc5843_core.c > index ada142fb7aa3..4fb393c3854c 100644 > --- a/drivers/iio/magnetometer/hmc5843_core.c > +++ b/drivers/iio/magnetometer/hmc5843_core.c > @@ -170,8 +170,7 @@ static int hmc5843_wait_measurement(struct hmc5843_data *data) > } > > if (tries < 0) { > - dev_err(data->dev, "data not ready\n"); > - return -EIO; > + return -ETIMEDOUT; I'd say no on this one as I suspect such a timeout only indicates a communication problem, not some delay in the hardware managing to return an answer.. It's certainly not a clear enough reason to my mind to argue for changing the error code (which it is just possible some less than ideal userspace code is relying on). Jonathan > } > > return 0;