Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3298239imm; Mon, 4 Jun 2018 00:46:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJI4ljVt+aZIwZeRVdyuI/v0UFFvfRBmZ2CaPrkFkYBROzagdjkinf24bvk7iPq/V2BVLSa X-Received: by 2002:a62:b201:: with SMTP id x1-v6mr16709611pfe.189.1528098398598; Mon, 04 Jun 2018 00:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528098398; cv=none; d=google.com; s=arc-20160816; b=vTEDtCus97/7EdfH1KBZlq46I+bLx47bQDuhXTh527hqbDhPTvnKL4PuQSeX7xLezb 8OV4acnNTFFz9Jb2xi0wmTTfsDvrB1zqb6dOl7x7GNU3/VWgYVb+SIzAsvx4OPTBGtFE QOLq0M0CtHq9XsfHtDJxeRX2zMXJnrG8LfNMR8oLZhxjE5h2bt1oxARgO9Xoqo6VQm08 IJJLJXMpTToPnCe9ApzmFN9kZ6ZulqwUXv9TZKCZcgj+Pr2Dgy46nMgjB4UwzEkESUoA s6Z0zIu6drPx6YF9TLxq/e1fwLIiVGk2F0zyNgynrK7SuEfqHLG0Ta8nwEZTfjZX75ro hK8g== 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 :arc-authentication-results; bh=Khk7O7xjOLs3ythnkaa+y3HoCBmE/GSfV/08nOZ12xA=; b=yp+JWOyh0Y828FIoBpzEKdjCeKOkW0ynRoJO/jyjbJ8s1JYNxgsMLBaAfj0IE16jGq M0wN/ldVebJGvqRemrFvZFd9f8PjlPvxSBhHXiraeV+VOIPGEaHgbIjjutpZUnlRH6Sq BkShN+vfqmtXZSZz2hoAwwsmxDkaNxYfi/AdKQ8UQYAwxb8ahbVNbVgoi/u7lJZhWD8V /DpdSWpdSQTAK1XD40IdPoiE4zvMY5sB+fKJgQefZq2Ku7p309qIi0y0xk/cmR2YeG1Y YFdJd8mZRiY1X2S6F2GA2iNUcv/uQ6nNmBcabmT2vsErON706xljlGyr22lB+34y6Yym okNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d/jor8bt; 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 w29-v6si10338724pgm.403.2018.06.04.00.46.24; Mon, 04 Jun 2018 00:46:38 -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=@linaro.org header.s=google header.b=d/jor8bt; 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 S1752023AbeFDHpb (ORCPT + 99 others); Mon, 4 Jun 2018 03:45:31 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:50599 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751626AbeFDHp3 (ORCPT ); Mon, 4 Jun 2018 03:45:29 -0400 Received: by mail-wm0-f66.google.com with SMTP id e16-v6so2197371wmd.0 for ; Mon, 04 Jun 2018 00:45:29 -0700 (PDT) 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=Khk7O7xjOLs3ythnkaa+y3HoCBmE/GSfV/08nOZ12xA=; b=d/jor8btExPKUqy84lM7F+pRkYNKjlLQbzgjlQILdjwEHnrGlCFeWLQ6WHblqfIJin skbWWy1vmIvlZr5uxuXsa15GglgxWDaS39IT05sDBREPL5z6TK6w3r4M5ZURFUuRk66A DQgBWW2iLTpscHEC7WhV/EFMq0y3cf3PUB+1g= 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=Khk7O7xjOLs3ythnkaa+y3HoCBmE/GSfV/08nOZ12xA=; b=W2ZTPAtYH1rj45oDeY8ai6j6anfpjemrlJCpwd2G0Xx7yfvj9jejN7L1Ih/zyGL/Xf BDkNx31SNxKmwImOOpUq1SiASRxTLTrEPkE0XVIzQRJO8SztnqKlvz1ewUWZ3cBEYgeJ uxQytABnA4hnw1FLj5iVeSK2UEfAidROjBKJYQ2PSz4p/HDMg3t8pYnWjQK6aONlEPRi wmHo+WOifZphhsndb992rjoUCLyPPnk/hSb25n4lyW+B/GYvyLtCJKQFl7zO78EkYXpc gAU0nGDrE8THoxSdWDdcM/EeznJ6/iDK9CPe1pL5/vEnh/vuftjvtzBuVDCewkqzjYqg Dhpw== X-Gm-Message-State: APt69E2EeTdAw5AeuLKawhJ/HpyExpbEpbVsx4TDulZZcqPKeZo4nrk5 BDZdnH7UeGdWTcN1oeghDOvplg== X-Received: by 2002:a1c:24c4:: with SMTP id k187-v6mr8144271wmk.116.1528098328782; Mon, 04 Jun 2018 00:45:28 -0700 (PDT) Received: from dell ([2.31.167.234]) by smtp.gmail.com with ESMTPSA id n7-v6sm28360597wri.27.2018.06.04.00.45.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Jun 2018 00:45:27 -0700 (PDT) Date: Mon, 4 Jun 2018 08:45:26 +0100 From: Lee Jones To: Stephen Boyd Cc: linux-kernel@vger.kernel.org, Benson Leung , Enric Balletbo i Serra , Gwendal Grignou , Andy Shevchenko Subject: Re: [PATCH] mfd: cros_ec_dev: Don't advertise junk features on failure Message-ID: <20180604074526.GL25455@dell> References: <20180531062343.243720-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180531062343.243720-1-swboyd@chromium.org> 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, 30 May 2018, Stephen Boyd wrote: > If the feature query fails during this driver's probe, we memset the > features bits to 0, but then we continue to overwrite that with whatever > junk we read back when the feature probing failed. In the case of a SPI > device, it may be complete junk, causing the caller of this function to > think certain features are present when they aren't. Don't copy over the > bad message on failure so we can fail more gracefully. > > Fixes: e4244ebddae2 ("platform/chrome: Introduce a new function to check EC features.") > Cc: Benson Leung > Cc: Enric Balletbo i Serra > Cc: Gwendal Grignou > Cc: Andy Shevchenko > Signed-off-by: Stephen Boyd > --- > drivers/mfd/cros_ec_dev.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog