Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3025196pxb; Mon, 18 Oct 2021 06:51:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJtZ08WADLp3GPO/kvtjiZeqeHWgk7x5Qag/YB6ZBjvOrG6e3PBS0rGyF/czFqlOl8TMwn X-Received: by 2002:a05:6402:26c5:: with SMTP id x5mr44614442edd.297.1634565062337; Mon, 18 Oct 2021 06:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634565062; cv=none; d=google.com; s=arc-20160816; b=olc4NMuxmuctsyrU6aJNNl1BPWUG05ZAVHET9csugiilSq3HV8YIPscxDKDEgZbyPW HnmvufoqJR8x0LPFATaMBjGhOErl1cobds+13PcZ0kA0jKUNuvIq7PMhP6m9Kcq3UMsR /0NAZ4xD2gT3J1+CcwOaHpkX3wHu4bf+yGDJ6d+obcujD0ZFyfVc19MnZUGCV7ygtYZi cXIK57qo6ysOHrO2x2Mv8FyyJYlUqFfoJOhXnV2EdadtuxalAn/bSrovbmH1wgGQ1SYl ekWlHprZjzueg4YMnTqwRshslHWKrbnyjKclvSs9uhKTponLysGKlipmXUTB2W/W4Vhg QGfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iF2Q/1RJxNDVgWIL2/bfa0uW+rfY1ct9IQXKvW5LwlY=; b=dojL0e7C6977+UlAlnhTFIBMTh3za4dGbthM7KyWTTt740ytHcUmHMOqJV66L0/Kcf /si0tbmcX+Lhf3LJ1yFHhahMP5btpvZsiUcwbOlndgIBj2A+ILeaCtUBGs1i5R3sW5+l JjHX2gJmzpge44JARixkjndDY5GBHjcQRtFPCFeGahUTT7YW2zy6JpGXT3VhUJEQbWDp 5AuUKFAchjNv4b5k8IECux7O6chcNleSgtYzcP4X64Hz78PEgXwOt9q9orxqld34DaqH Bbq4VjubWO2bvVflSC4pwGyCBta6WCKj2R8RbKlPBZapqscfX/8KUuwOcYOwiQzC6xTR UQYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ueg9CwjB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si19091047ejx.753.2021.10.18.06.50.38; Mon, 18 Oct 2021 06:51:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ueg9CwjB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234000AbhJRNuS (ORCPT + 99 others); Mon, 18 Oct 2021 09:50:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:47682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234015AbhJRNsU (ORCPT ); Mon, 18 Oct 2021 09:48:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 26E9C613D5; Mon, 18 Oct 2021 13:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564217; bh=8pbmoMm1XhlbrHMxJD1caV5O4QJWhfMAtEFJXtpu3+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ueg9CwjBtxT8hnjU++26TyjXYvmlu0jNRSFpaDhnFgv726Qs3PpJtTrI45O5xIp29 jZm2RZRBlzU88nXP+EMgeKviGTlDCLxV1iHTVjtSj/vqGjnBE2Mqsn/AhwvQXwi4KU tXBuCglswimi4/J8RZ5kOXzZBisdWfQyJWpAvyrA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vadim Pasternak , Hans de Goede Subject: [PATCH 5.10 086/103] platform/mellanox: mlxreg-io: Fix read access of n-bytes size attributes Date: Mon, 18 Oct 2021 15:25:02 +0200 Message-Id: <20211018132337.642837502@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132334.702559133@linuxfoundation.org> References: <20211018132334.702559133@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vadim Pasternak commit db9cc7d6f95e7d89b0ce57e785cfd9d67a7505d8 upstream. Fix shift argument for function rol32(). It should be provided in bits, while was provided in bytes. Fixes: 86148190a7db ("platform/mellanox: mlxreg-io: Add support for complex attributes") Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20210927142214.2613929-3-vadimp@nvidia.com Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman --- drivers/platform/mellanox/mlxreg-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/platform/mellanox/mlxreg-io.c +++ b/drivers/platform/mellanox/mlxreg-io.c @@ -98,7 +98,7 @@ mlxreg_io_get_reg(void *regmap, struct m if (ret) goto access_error; - *regval |= rol32(val, regsize * i); + *regval |= rol32(val, regsize * i * 8); } }