From patchwork Tue Jun 9 17:45:36 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: 187691 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp767056ilo; Tue, 9 Jun 2020 11:00:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMXbAB2rn/un61kwXMnFT+DivEOeYrrcsqkvlGLhtWBS2Q797+N9N6w6A2W0o3odDV1Pfq X-Received: by 2002:a17:906:f2c2:: with SMTP id gz2mr19289749ejb.260.1591725649947; Tue, 09 Jun 2020 11:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591725649; cv=none; d=google.com; s=arc-20160816; b=V8dYjbH2VedOdretsEHUR2mpU2rttuwhxCFm6r8jdWiVUVe24FEZduRJLt8hNWinqC /+/P1dOISfSxbpVmgmTTo8VXBT0bOn3CIqAx26HT1kjJYdHjb4+VIVuoL9Cre6igNtW1 c1XMKHEMp+Qv+ZwNHVqNuVc8yj99bsx1CnbkmMj8pQbhOXknuYcoRoDWF4NDUA3c61gE 5kF3kolW4H1LbNuiPuuhn1XNnG1CoRegNOTqkOGtoBaO5GfqqAOQzzFeg/2Ia0/o/eAR sw3guJZo0YXipNelVlD2eu66NVXWnNu6vRelW/zKwkkU4zanP6P/0iXN4hixyUy2iNwD IApA== 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=yjK8h5YjMzmbXpb8V+vgluSHcpqdV3SU78H0Tt5B/qCx7SNizR6dCSfN87qJwNKWCb aH5f3m/jhupr+ZLHkJ1Kgr0Zi2pYzD/CiT4BcEmFqRimP+yhVf/fIoPl88JYeaAIb0cT 9HGjJXZ2BJhTahvxow9rVlUFZdvG5c+CSpgD/ODI/dseui8e2/ea72ON0CmuT7EptWRJ Ax+AMhC+r16sJgg3lZSMNq2cgYLtJ57OadmKbys2S2mnBcrRo8EFiao65Y6Yr61wEzBo yuiA6yc0Osh7AF6kdGsVTaBrrVBO82DCZaTcjBAxIdu3/DKZYIDmf35t+XqVNDUNgv2l 4Eqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rNZL6LZ0; 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 bf15si11825969edb.553.2020.06.09.11.00.49; Tue, 09 Jun 2020 11:00:49 -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=rNZL6LZ0; 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 S1733092AbgFISAs (ORCPT + 15 others); Tue, 9 Jun 2020 14:00:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:45896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733074AbgFIRyU (ORCPT ); Tue, 9 Jun 2020 13:54:20 -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 5AD66207C3; Tue, 9 Jun 2020 17:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591725259; bh=mlChgyTv5SQLeyzNVZm89cxyxj49nT+0TF3uaH4MMaI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rNZL6LZ0wzYL1ltexgz6kaOe4ef0DqMstMUXx2e7REfsRLPL8FBsY1S/VWr6FLAis IyakcJ3Ie6vrkTOdKq5J6a+tDTqXAWyoBJkDLB28HIOVfLjppzggOjRJrsBmT4YbBs PuLPk5V3fYW0XqpS6c1+rniIoZsatgob628TJXeE= 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.6 34/41] nvmem: qfprom: remove incorrect write support Date: Tue, 9 Jun 2020 19:45:36 +0200 Message-Id: <20200609174115.324191619@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200609174112.129412236@linuxfoundation.org> References: <20200609174112.129412236@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)