Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2027158imm; Thu, 20 Sep 2018 06:44:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZbtwZDq2CEZsnv7ulbuP5zBrru4EFHRKmZnpQMzz4GCmjwcf6X6TuwpAtdPmg44HFW3NWV X-Received: by 2002:a17:902:934a:: with SMTP id g10-v6mr39441120plp.121.1537451085696; Thu, 20 Sep 2018 06:44:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537451085; cv=none; d=google.com; s=arc-20160816; b=PevMVMrDwZWkpmL/sZxhdXSUIltUNQBm1sRt8QAOhmJh0hAAXNR1adj3apYZi9eVRJ pIArGjVWJgSGz0n6mX4Z20ADkXz8jioJoQTcDaK+fyc60E6qIk74MMy6u7pDNNr6P4eR RyAOz9Hamaie8IXZLhXkv4b7JjAiIErSaLjs3Ef1qLwvYg/WhMZOYqA/wj2du97sRIc2 QFmFzx5SYIK2X3rrpdKujhvjaUOGWx22ikwcm89W2u6ceKB4QdXIPYbErBKju1N8nTRt UOMiZ2++0SzfIp37blcGcxY1TaJQCGoWZkASGQCnd7lSP3qPO+mx6vrgg3KLx5yzAUMZ zL5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=o6m+8LaU0HanMrlulsKdznSgYYutZpKM4WVXP+Nd1nY=; b=nf5LLCgAR/ku4y3OXYeADXMTQiKpGUvEfxiSa/7TUZ4O7fK3OgBZ+jM/SRqermdeec 7wH4B0lSbldEaqLwnJngl+fR94iMZFGu1RlEeLUc7L7NHTrIFFOFFX6EcLLHpTY2q9hh AHAVof9HQbVo6760k75LLh9cvFgpKAc52lOOGFxAp6oxanjMQY5zgh8tQJe5+l/BqBLY LPVMFkBtrLxYyp98kTw7hovQadHLeCsyYqDY+WJFwmfNlWjII5a2yRnY/rEUhTV+1wkB C9jticCPuLUJIrJ2q9Ahml3PLyO/AhV/Z4PPhheTN2WutEh0s/HbJCNXLlUddvf+nKhK mesg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i3HBnFi0; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6-v6si20676905pgq.503.2018.09.20.06.44.23; Thu, 20 Sep 2018 06:44:45 -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=@gmail.com header.s=20161025 header.b=i3HBnFi0; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732870AbeITTZ6 (ORCPT + 99 others); Thu, 20 Sep 2018 15:25:58 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:34646 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732496AbeITTZ6 (ORCPT ); Thu, 20 Sep 2018 15:25:58 -0400 Received: by mail-pf1-f196.google.com with SMTP id k19-v6so4411031pfi.1; Thu, 20 Sep 2018 06:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=o6m+8LaU0HanMrlulsKdznSgYYutZpKM4WVXP+Nd1nY=; b=i3HBnFi0zN/3e370Nh8Ft1bVHz975m7JDe8dv2AJanYLnHz6Yr4rF6uBaI7KBLa6we fmMqbFxaIn0vIonhmbViybNENUFqeWbUHAcuTzt+G3G74Mlw90dLdDBXp6C17/sEK9Tc 5cQ+uMjH0xC81VLozEzQOKTrfkiyoAa7BC4dUdBJS5DT3XZLjEE3npQSZxyV7rBcMnlt NI3/+mWCvF0n+hLDxkPsagG57hWRs1FckD2qkC9YkFuWCdJYTFJTffJWv33x02CUDN4e QVaEHodj4QiAwWwqzSJmSF+bbsRis5vNQxQ8IuBz8QN8bMPu2pTDY6f+dPLzDxMNt6vg rcmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=o6m+8LaU0HanMrlulsKdznSgYYutZpKM4WVXP+Nd1nY=; b=J8c8bnJC4fPo+xJXjfNbhubvSFrNemnMyMfcdGV8DkBfjLBgJV6nY2VDElikSleTXZ WMgY82QKfOs4jIqLHL76ywKFwKuzRBS2x1UuaYk84uuM6uU9f5LhLSFXSxlrDOJUq8y6 +RwlHsYmxkvjguOmCf55IbVZPmm0y07P/W3srXiPE4v5NGTB6MNV9BxX0XKF08vhANOp O6o4yCv2kDV2YU+njR8SQ2HMVtYOcQLIII7eHB0lCdSI7Unq6a9HXwfRN+p4tL8cJ7zR 6sKH7qrRdAp5JD7+Q7zZ+edVsbl68Nax8G12PXjyBI7HHVc8/4ycXRm6ViQh5qYWfYsk 0AoA== X-Gm-Message-State: APzg51D3GqaUdvCBsb5A1ISZaojb5NhaC7KeLatQbUpLFpoPPq6qqgU6 JG3TyPR2sJL5MYERjL259RQ= X-Received: by 2002:a62:6b41:: with SMTP id g62-v6mr6149017pfc.113.1537450944991; Thu, 20 Sep 2018 06:42:24 -0700 (PDT) Received: from localhost (104.176.229.35.bc.googleusercontent.com. [35.229.176.104]) by smtp.gmail.com with ESMTPSA id 8-v6sm28238994pgu.10.2018.09.20.06.42.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Sep 2018 06:42:24 -0700 (PDT) From: Song Qiang To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, shubhrajyoti@ti.com Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Song Qiang Subject: [PATCH] iio: magnetometer: hmc5843: Replace a return value. Date: Thu, 20 Sep 2018 21:42:19 +0800 Message-Id: <20180920134219.8402-1-songqiang1304521@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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; } return 0; -- 2.17.1