Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp182224imj; Thu, 7 Feb 2019 02:37:49 -0800 (PST) X-Google-Smtp-Source: AHgI3IZIJ42sMrGaLIMMLtQnSd3oF5rjwqNeniKN1vJFsTa2lFz8daJ3jqKFL7HrIfzshMWMYxZO X-Received: by 2002:a62:380a:: with SMTP id f10mr1727464pfa.100.1549535869047; Thu, 07 Feb 2019 02:37:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549535869; cv=none; d=google.com; s=arc-20160816; b=Yb1at/usT5IlOltgKd9yQqhnZMGNmejC+YfVGqys+68m2k8zUooggvst9Jh6HApgZu KVx+A8GOEo2DlftHGLTIw39WivQ/YgekVrIpupXdRXe3tJO5YVEtXuFBF3muugYLl9vS qufsh41bh0HKLD7t4XjYs4XAEyc3SZ0OmOD1X5jToNFsBV4DT1gcaMmwYSznAtWSqoNg v2vM1AMHIzDer2ARUANV1S93NqABvH8NCOyZQqQBP8QfaENLGfQLPYLT5Z6S17eJx6O6 XKKwjZTFD0WMojgQwUlCB1FzKGzJrzSX87ibPUQL8EmvU95Z8ru8VtAUmS947L8PlYeH WsSg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sl9gmLvLUkVQTCmOsYeIup4YOxFEMp8Ofw/UybW+dyE=; b=mvrCsDNvieUNTOh1aJQKd+49u5ubFkLCk2MgMuDgsVDCDRReVncw/OSO+w2alGqbml 82EiceoMcBWNSZLOohSiIpPaLZos+611St0pwEKACj2yHRvVgFHqn3OuYhJaXeL01c6z kiLOe2CPW9Udn0MNtIwQ4hQt2fMqbq7Ig3pj0ROfj5sHi9n5//Yg7+59sYIdcMgiGOJr 7ooV+OVIYotjs82TV1dPmy8RRzD/RnqzrIdItT6nGft7UnpJ04lIvM9Dv7v3wKsD5nW7 imul9pjYWcqhhwdTZrKIbmab/ck2LMd+kUi2ncDD5/0jZewPscUrXpWEjwG8DuOTxVDk Gi6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=joUjveaC; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7si4601773pfj.282.2019.02.07.02.37.32; Thu, 07 Feb 2019 02:37:49 -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; dkim=pass header.i=@linaro.org header.s=google header.b=joUjveaC; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727039AbfBGKgf (ORCPT + 99 others); Thu, 7 Feb 2019 05:36:35 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:40169 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbfBGKge (ORCPT ); Thu, 7 Feb 2019 05:36:34 -0500 Received: by mail-wm1-f68.google.com with SMTP id q21so6105603wmc.5 for ; Thu, 07 Feb 2019 02:36:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=sl9gmLvLUkVQTCmOsYeIup4YOxFEMp8Ofw/UybW+dyE=; b=joUjveaCTz44ND5vV0DxvCALsDMUsKZ73sx/gtAjS6rWyilQ/L21ibedK6aULN1Ea+ EeHNOJD33UEzS2roXYDZOMcelmhoOOED4G54U/o1cvAxwN4HIt2dqGdB4kideRi+egT5 17KoGlWOaK4xwW4Md0uywiBSAmyI70KWq7Apiofe1bgJDUvdX0AaDAUAhw4X+CCZY/zd bxSQvO6YFpwfXUywcUEL0KtjCiuDgafxbunJqqqoq+pPX4JuraLRIGNwNO/zvD0IsTtB M1erd6o0NzrsaE4Ka5qGyRCnPjDXEQvBYzfA0ZDCLJJNPuRzrDv04ywHCKFBtTd1kSSF Hwkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=sl9gmLvLUkVQTCmOsYeIup4YOxFEMp8Ofw/UybW+dyE=; b=p3h7chNfo8fkXli6Tnd7BcQMT4wZWk6AEQdaeVBPhbCQ1UJsPfUyJlpQMvbDCHZe7b PSOKCRQ2kuuNNgZ94PfLPBokTTuc6bclhR5eJW0Z/dJ7pLADAonjb2p0mzPOLXFC8LX6 KbJ7b86GH0ku/03t79/8/RweUo2f2A6+FUf3TqMMV0OfNkpPW0HXPEupUBODwDhVYN6c RLYpjWbV+dUIW8FsUtJp+N95o60FBtEtrdD2ZFhIebjsR9am0pz5pczL8+Ncj5+DMTLr RgOqaK2hqQfy+KWr9Ef9QG7OReqXEm7H2r59uAD2JaUbYxt0WWM0Fa4uiGvXkomuQaV/ F5VQ== X-Gm-Message-State: AHQUAuaBquMaamiZj95ixlI7QWvCoSuZa/7HozxpYC2QUXt1XCvSiVzr CPkGg+KUO+N+e4HCSN3dk/R2dLlUkSea2A== X-Received: by 2002:a1c:5656:: with SMTP id k83mr6924930wmb.125.1549535791923; Thu, 07 Feb 2019 02:36:31 -0800 (PST) Received: from dell ([2.27.35.171]) by smtp.gmail.com with ESMTPSA id z26sm1064110wml.44.2019.02.07.02.36.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 02:36:31 -0800 (PST) Date: Thu, 7 Feb 2019 10:36:29 +0000 From: Lee Jones To: Enric Balletbo i Serra Cc: linux-kernel@vger.kernel.org, groeck@chromium.org, gwendal@chromium.org, kernel@collabora.com, bleung@chromium.org, Guenter Roeck Subject: Re: [PATCH v2] mfd: cros_ec_dev: Return number of bytes read with CROS_EC_DEV_IOCRDMEM Message-ID: <20190207103629.GD20638@dell> References: <20190206173959.23925-1-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190206173959.23925-1-enric.balletbo@collabora.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 06 Feb 2019, Enric Balletbo i Serra wrote: > From: Guenter Roeck > > While ioctls normally return a negative error or 0 on success, this is not > the case for CROS_EC_DEV_IOCXCMD in the cros_ec driver, which returns the > number of bytes read instead. However, CROS_EC_DEV_IOCRDMEM in the same > driver does not return the number of byte read on success. This is both > inconsistent and problematic, since the amount of returned data can be > dynamic. Have it return the number of data bytes for consistency. > > Signed-off-by: Guenter Roeck > Signed-off-by: Enric Balletbo i Serra > --- > Hi, > > This patch was send long time ago and never landed to mainline [1]. This > is a second attempt. Originally was made to apply on platform/chrome but > after the recent changes we did it should go now throught the MFD > subsystem. Without this patch userspace tools like ectool doesn't work > as expected. > > Best regards, > Enric > > [1] https://lore.kernel.org/patchwork/patch/665211/ > > Changes in v2: > - Adapt and rebase to current mainline. Applied, thanks. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog