From patchwork Tue Jun 9 17:45:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 187696 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp770201ilo; Tue, 9 Jun 2020 11:04:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztinPLkStjS8pw7EVax3gc4Mz1QzuGSiQrvZiciG2rO1FWuZrz5kJsQVAvY0tJPb0hpzFy X-Received: by 2002:a17:906:3158:: with SMTP id e24mr7947702eje.543.1591725844755; Tue, 09 Jun 2020 11:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591725844; cv=none; d=google.com; s=arc-20160816; b=DlahKdxUfS5DxOkcYBfBuM1Q6KvEONYo9rHLeBW2nT/QrzQmb/UMoWPx3DvwBkWv/F 3GkisAL9lWz8pSKiTMe4LpfDk3PC/WVsg+vJhOIEYvnHXjxW8FQipqbKASb68pzMp/m3 0hY2m4uniA8C2MNrarnYO1f2IgAc1cXnpuklBB3EMJa5Hb5jkKs+uBoJJTMJXGyBNK1p 072nWMXCxEoGn78mljEAKYynq11EncrMsdXvn7fbsK6DhpGNWIxj7oWY+En/R8LvfYYJ Kd+K15QQpJ5PdFYQ8BcCf+pM4MgLCYfccBIktf4U0M6RGCFGESj/pW81TfiOMMyo0hv9 kXrQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/rtbpW0aQEeZ4NFcx2rYrdvLKJmdYcGqqwuOKRuwTdk=; b=myKWF+AT2sB4EMeQE4HNwPzkPhOgnPIjf3MJ1vyaZG5RV7meZU8JGbmh6LZ2RO2mhe v61cDSbbfOBNQl//bAYe3gSqKvWw0BilPI+M6IAbKXY0jVl4WV+kfIOc8hVfzB+72Wub M41ISP9YjJwWigfy3xdCiFESZyi0MRmi3JOcJjeV4iADDmtDUKmT4hmqtKLdGMFSdIPP jjUhkIOtC4nhbE8o0h03UtgUSBkZmX2QEOmp3s3BLaV9BtqfEHqAYhFhLuJsrZDpCoiz 60XGlXgvbklhAkF2+0v1ftHqFzZfy0qb9tU/YfYD3suEGDnVKccucmaTn8GbXpChVmPC MQIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="GavMI/mR"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n25si11282764ejs.551.2020.06.09.11.04.04; Tue, 09 Jun 2020 11:04:04 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@kernel.org header.s=default header.b="GavMI/mR"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733051AbgFISDk (ORCPT + 15 others); Tue, 9 Jun 2020 14:03:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:43126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732922AbgFIRwl (ORCPT ); Tue, 9 Jun 2020 13:52:41 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 72603207F9; Tue, 9 Jun 2020 17:52:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591725160; bh=mlChgyTv5SQLeyzNVZm89cxyxj49nT+0TF3uaH4MMaI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GavMI/mRc+WajWXLqaPhQxH5t7oLAx/qRwoQ5nOfH3LKYBOZJBhf0AZNkaRQchwZ6 AKlgmvnQyqlKmBAqMUYv+37YQ9jNqV3LyppgtFKBtDVIUBE1iGHO82GYQLPRv8Knbp hcwPWiRBIiEz0dakRjdL1ut921HqfEzUBJ2ZBs8Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Douglas Anderson Subject: [PATCH 5.4 26/34] nvmem: qfprom: remove incorrect write support Date: Tue, 9 Jun 2020 19:45:22 +0200 Message-Id: <20200609174056.359919958@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200609174052.628006868@linuxfoundation.org> References: <20200609174052.628006868@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Srinivas Kandagatla commit 8d9eb0d6d59a5d7028c80a30831143d3e75515a7 upstream. qfprom has different address spaces for read and write. Reads are always done from corrected address space, where as writes are done on raw address space. Writing to corrected address space is invalid and ignored, so it does not make sense to have this support in the driver which only supports corrected address space regions at the moment. Fixes: 4ab11996b489 ("nvmem: qfprom: Add Qualcomm QFPROM support.") Signed-off-by: Srinivas Kandagatla Reviewed-by: Douglas Anderson Cc: stable Link: https://lore.kernel.org/r/20200522113341.7728-1-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/nvmem/qfprom.c | 14 -------------- 1 file changed, 14 deletions(-) --- a/drivers/nvmem/qfprom.c +++ b/drivers/nvmem/qfprom.c @@ -27,25 +27,11 @@ static int qfprom_reg_read(void *context return 0; } -static int qfprom_reg_write(void *context, - unsigned int reg, void *_val, size_t bytes) -{ - struct qfprom_priv *priv = context; - u8 *val = _val; - int i = 0, words = bytes; - - while (words--) - writeb(*val++, priv->base + reg + i++); - - return 0; -} - static struct nvmem_config econfig = { .name = "qfprom", .stride = 1, .word_size = 1, .reg_read = qfprom_reg_read, - .reg_write = qfprom_reg_write, }; static int qfprom_probe(struct platform_device *pdev)