Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1689531ybi; Wed, 17 Jul 2019 20:10:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4IesxlgdN6caQeoBqldADarWN3cJl+ypdFwALo5WQqI5+YrnfLBGmfPpuDk2bDAizunfv X-Received: by 2002:a63:7245:: with SMTP id c5mr30823540pgn.11.1563419440600; Wed, 17 Jul 2019 20:10:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563419440; cv=none; d=google.com; s=arc-20160816; b=qfkZHLk4JepAifxrWLkvZJI01+P9Zt5/YCGWT4vvjwyWDJNg9W2TW+wklJET2cdqm+ jBixgxcvWindZYnHg4VZYptrMCAm3/KxdOi0dhWzL5A/5CJuzTA/p4KJ0Enx3k9k+QMO awnV0tDnuaD6P1Rgk8LPyUwticZb/wd55ThKd5Yd+76sIKOGjQFaqMgvMXWajimuWcF4 1JJeACAPi+xHxMDaBXAKvs5gopL09TTle66ndYGNDUxWIZ0at0UOZArBRQR2y6kkdZUs buRSNdIpjTpmFxY9MbgBvrh6VZ1VZ5feXvobdcN07IsQuJTgBIr1D8+Oq8iZarP89OAH pY+Q== 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=AtP5jzsSlAsnZZbmp5kXNKW5aDjwcmfmbgnpGtXEeSY=; b=adlk/jVeG0J2uzNGJx/z/KHvbHgo20dFqdI8arLz+yfNM2AFjUyR0fMKAlBFlA5Jzh kbNaqzj/p92J08nE5QqWMjqmkucf21MPY+UqaHyjiGzUD5m44vN52RLUu9+ZHRzE/JFi RhnYIQ8OuL3Tfh33HGqK2s3JNXqc4Utl02OX7Ax3x0bJqiKoTmnvep+CasAbsQZa/1YO l5wbv7eW21Y1f+F9yAntZShnaRfR2KzDOt3eigJVzqi6fGdtwSTvnU5MLCCbqTc8aqtV zLCMyn0Wu/2NQ23T8tzdfztxrtvVc6m5KkfOEpK7ngpWnF2V9dUYN2cASisgBtptUkFN 5G/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GiSpIIGY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si986828pfh.38.2019.07.17.20.10.24; Wed, 17 Jul 2019 20:10:40 -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=@kernel.org header.s=default header.b=GiSpIIGY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390606AbfGRDID (ORCPT + 99 others); Wed, 17 Jul 2019 23:08:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:39830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390595AbfGRDIC (ORCPT ); Wed, 17 Jul 2019 23:08:02 -0400 Received: from localhost (115.42.148.210.bf.2iij.net [210.148.42.115]) (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 D61D02053B; Thu, 18 Jul 2019 03:08:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563419281; bh=v0pOiJG1mOvtjYpbErT3N6sGzx26BLv+XJTj6VVqERc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GiSpIIGY9q9fFlVoggV5IaitlU636xftM89VqImaUzvT5J/0pXFu609JZvVUnydRe Cbw8cBG5PiU7aeUZu5Ptj0fnqrCAGUSTSBlHIt6QPy01fPoW53C3p0J/bDQ3gek43y r8DyZw0AociDHqajRmQ0028O6E5br4FLp0sUSov0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laxman Dewangan , Jinyoung Park , Venkat Reddy Talla , Mark Zhang , Mark Brown Subject: [PATCH 4.19 43/47] regmap-irq: do not write mask register if mask_base is zero Date: Thu, 18 Jul 2019 12:01:57 +0900 Message-Id: <20190718030052.402102574@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190718030045.780672747@linuxfoundation.org> References: <20190718030045.780672747@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Zhang commit 7151449fe7fa5962c6153355f9779d6be99e8e97 upstream. If client have not provided the mask base register then do not write into the mask register. Signed-off-by: Laxman Dewangan Signed-off-by: Jinyoung Park Signed-off-by: Venkat Reddy Talla Signed-off-by: Mark Zhang Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/base/regmap/regmap-irq.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -91,6 +91,9 @@ static void regmap_irq_sync_unlock(struc * suppress pointless writes. */ for (i = 0; i < d->chip->num_regs; i++) { + if (!d->chip->mask_base) + continue; + reg = d->chip->mask_base + (i * map->reg_stride * d->irq_reg_stride); if (d->chip->mask_invert) { @@ -526,6 +529,9 @@ int regmap_add_irq_chip(struct regmap *m /* Mask all the interrupts by default */ for (i = 0; i < chip->num_regs; i++) { d->mask_buf[i] = d->mask_buf_def[i]; + if (!chip->mask_base) + continue; + reg = chip->mask_base + (i * map->reg_stride * d->irq_reg_stride); if (chip->mask_invert)