Message ID | 20190818093345.29647-5-srinivas.kandagatla@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1582792ily; Sun, 18 Aug 2019 02:34:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyg4wkgDMoZWrcDmdVRX26dINO9XMuJ5TT2tnaPsmxr/03Qi8ukP06KYODV4tzPApzWze3e X-Received: by 2002:a62:cec4:: with SMTP id y187mr18806926pfg.84.1566120887455; Sun, 18 Aug 2019 02:34:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566120887; cv=none; d=google.com; s=arc-20160816; b=fPjBVKPYMEDgJlR8QiJxnoWpsvjE8C6S7AjqoJxwe7s/CH8s/OZOQspk4VOn3EcYbE +d5Eq1jG2NdITML83mCtQE2HRpy8F4DzLaEnVl1aF0dvhh7Tr7p/hGP3Fc2dog/xNfN8 I55mGAkbvhyjMZjXQrTBA6w98+N60PHtH9v11zeU1XrcgaSm6c3QIErwxZE86QwWFUW6 WSa3NOvaZriGJAcUVDmZnFOTjt6lsUuGIE5FfJXSnhUpryG+fN8FVYGSW+u82m/18yKW UQICTXeqSWZCB8a0P+hDvGtPqOfEtIl2ZDbXeDvLVB2/Ch8I0TRaTqHISo4B56HZBUak FQqw== 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:date:subject:cc:to:from :dkim-signature; bh=JciP+sgA6x3vXVEb6ByrkWLVlRaOQlC3JG7PQh8jt2A=; b=XRyJ26kdMhlYmN3ZKMmyDcH452HpkVkh2gEVgcIE1ZBPmk3OBfa5zX/tREYIE+hSyu 7ykA7KuzTUKZwpIkxC2fVVUC7PvkaX2JUwUE3Lw0ex7Nb1PvZ840z8i4Gs2GtGIQluGB qfMKXxpQQ0a0D9cxrXbDqSLtXgzbZTek33t8s3q+Qgj8Q8R2KxsUjY6SNYzAcuYqY1cU mIRHAQdktfiOEYWFE+e3JhIHDc4ziCbjo8DJLAXgGy7c0jQJ/NiGbUmJkds8gVIzm9TZ JMsFtq5RHD5ayf/UgjPzIJmsAGnAbsWtKFgtPeDMiOwk2HDtb8zgeJSzjZOQEba49DAL SEsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=unozXp07; 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a64si8063356pfb.60.2019.08.18.02.34.47; Sun, 18 Aug 2019 02:34:47 -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=unozXp07; 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 S1726696AbfHRJeo (ORCPT <rfc822;mike.holmes@linaro.org> + 28 others); Sun, 18 Aug 2019 05:34:44 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:50618 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726627AbfHRJel (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 18 Aug 2019 05:34:41 -0400 Received: by mail-wm1-f67.google.com with SMTP id v15so517231wml.0 for <linux-kernel@vger.kernel.org>; Sun, 18 Aug 2019 02:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JciP+sgA6x3vXVEb6ByrkWLVlRaOQlC3JG7PQh8jt2A=; b=unozXp074XF5Jan16QB+lXoMD/yvOtXVxk/mDNPMre44U1G03QnVVIbI0oKCbGfrF5 FZxLMRAnfpuUSU/SGDuRA+0NnwqFDx+GtiBkUNlTcF5JHyY46Pk/gUnS0mr8NJmATAcZ AkeHnBRIyR28LqPYnbUs/b8UPczClNuBj9b+QWd+3w6qTLFR6H4gXK34PobgkmZQWc7p XFB7u9VhSpMg+vVSx3VGFG1pEYs/O8+mel6fQD1/9xWmuzjKswPL/ahQmqXDxmD83Txb 3vgXruYYnHJQ644+K16obaYPhg5je3nSo5daAOxtT8Au8RABWGYirfMqRyV/XQE9W3bt Ibaw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=JciP+sgA6x3vXVEb6ByrkWLVlRaOQlC3JG7PQh8jt2A=; b=KKcBfLjoWSbm6KSe1+cN5kTyrPE2Bs6P50AfhPFqD7QYF1/ynyw6w7YHoIY8GvzLsi E5n+xnj0ExXBtZI4ioBbvmDgXq3NSHRJ+iGPHBV1O7B9ZqA0jrD1Uxg5c/XyDwWeuvEa GBnsl7lWtYz8F90bLl0WZTADxZO0phynn33dOJ/CRwfejuVmE1FpFANQHRJZ3BzNDFKG aLbnvTOpk0q3smn1lIrZHr5JzpwzDElswdeV0bfyerSQPAFTydiLu1cjSnnr+3XK894I F/VbgwST+42VpCKei1oOMr1uvkpBJGAEuTf60HNoGvdK2giFXIy86gFzgZvErw7RDEzp 1jrA== X-Gm-Message-State: APjAAAVSgqAQ6yfA0Fusir9DDuvav2XH2fYC647KqtEXwXAaih1ppeBb SrYlhSDDVjeGW7JdsMi9RI8zt/cpfdg= X-Received: by 2002:a7b:c246:: with SMTP id b6mr15478693wmj.13.1566120879954; Sun, 18 Aug 2019 02:34:39 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id w13sm25042828wre.44.2019.08.18.02.34.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Aug 2019 02:34:39 -0700 (PDT) From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Martin Blumenstingl <martin.blumenstingl@googlemail.com>, Neil Armstrong <narmstrong@baylibre.com>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Subject: [PATCH 4/7] nvmem: meson-mx-efuse: allow reading data smaller than word_size Date: Sun, 18 Aug 2019 10:33:42 +0100 Message-Id: <20190818093345.29647-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190818093345.29647-1-srinivas.kandagatla@linaro.org> References: <20190818093345.29647-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
nvmem: patches(set 1) for 5.4
|
expand
|
diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c index b9f9ce089de9..07c9f38c1c60 100644 --- a/drivers/nvmem/meson-mx-efuse.c +++ b/drivers/nvmem/meson-mx-efuse.c @@ -155,7 +155,8 @@ static int meson_mx_efuse_read(void *context, unsigned int offset, if (err) break; - memcpy(buf + i, &tmp, efuse->config.word_size); + memcpy(buf + i, &tmp, + min_t(size_t, bytes - i, efuse->config.word_size)); } meson_mx_efuse_mask_bits(efuse, MESON_MX_EFUSE_CNTL1,