From patchwork Thu Mar 28 16:22:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 161326 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp918944jan; Thu, 28 Mar 2019 09:22:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqymBWQslgaMMI2s+G4JcLk7qwbML7njLa/v5UkwgHPJOVegbBydm6V0pLW63ltZ+/4m2k+W X-Received: by 2002:a62:1ac3:: with SMTP id a186mr41519062pfa.48.1553790171319; Thu, 28 Mar 2019 09:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553790171; cv=none; d=google.com; s=arc-20160816; b=l2ymV0c4oa2xZsQtK33579SUoM3irMaotUwC5bvxn7uxcWwAy5YEZr7dlFWdQlDCdt Z15EBcSLduq7mJ39lLMqFeJIV77paq0niD2hsCQfQgNI1+N/CCxVjIMPDQN7Lp6tn725 In42xJEssssh6KwUTQp6Hkljfvn6bZep1Mo0ASqUh8ZBOpYyznMTPos1Z28XY/J7D/TA z8S6NzZ54WDVQqxP8jHe/Cyz//8NNNXp/fb3r6gimaVjslutgkJ+2h7udrT/G1rkbcHP tii8yuMkuqfgRC4jWVMzzf/TTjEAnBBW0j36TtqbmmMWtzPj8VhqwfhMQcy/7r2WCGjX q54g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=lBwsKuOZmljYQRDf22yDXymVd8t2rdhLoRL6JMRCqac=; b=qHcyk17xTxwxjoywIFPZZ1V6bc22+6p3PELyA3cxmSk0keBReccFUMp6flTogVHtBW vIzuqY8aUBaTu6/4G9rdLrwpPcTTB4MUbyWAz6B84EtLQfcslmrsaKPtDVhlZNvOFtcM FUHjkEGV1z6FCqkFanbb0z/WRU/D5F5GadbeOy2ricoXNaOROLPDxk2v4yyJyugspz8b rfFNQgfrHsbtzjUolHC0x/ubLvFfjEgaVBRJR3CHWCDqanRmS/kgzcHep88yyPSZCPWi TxyQbS8+YEZOANSv5RzJPBWSsnLZRcr472aJvN8hNzBR/Oyg3yKX2uh2QSwhQlWjklBq hxoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VUTO3bWQ; 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: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17si21627063pls.181.2019.03.28.09.22.51; Thu, 28 Mar 2019 09:22:51 -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=VUTO3bWQ; 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 S1726715AbfC1QWt (ORCPT + 31 others); Thu, 28 Mar 2019 12:22:49 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:45154 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC1QWs (ORCPT ); Thu, 28 Mar 2019 12:22:48 -0400 Received: by mail-wr1-f67.google.com with SMTP id s15so23655100wra.12 for ; Thu, 28 Mar 2019 09:22:47 -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:mime-version :content-transfer-encoding; bh=lBwsKuOZmljYQRDf22yDXymVd8t2rdhLoRL6JMRCqac=; b=VUTO3bWQKsei8M3CvwM8l3W2irNVm3lJZoY2azFY8r0dMt91JxH6mIm2hZbqAZU60w ZYiqJzDhW/NKZ5AZ0GECXza7DCWLDlu41uKRR/Izk9R4oApp5/TXSFeyVmsckUfPH3Wq lM8e/MRRGRXehN9j4wVxCYWX753/aN0fHxyxgwQxDB6FbBSK6uVtM9Hc5w9Siv7Isj4E QkgR8rmMNmzcr8KHakfe3guWhE3BaLL2SY45XZo3s4Bt+CCWiVATHmosD57oaPBg15Jm JJSfKyFl3zHSilWg/JbXTGhtXizf49wRW+gAiF7UJST6lJldrT5CwLjRKNfe6HDD4dIt LO7w== 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:mime-version :content-transfer-encoding; bh=lBwsKuOZmljYQRDf22yDXymVd8t2rdhLoRL6JMRCqac=; b=XaY5b8xZrS4Y/BmknOWiP8scffCh5XHQvScpYO7sdTsPYKaV65ELbbzOun3AQzyaAE kZtMwRko5d5xFGNjzxkiaziUOHIsMbHNYgElPhVUJRVZECKekMc9MzbpTNXkLUj70C6j 7Nx1kmcK/VDPNSykV+t2aoJ8ouoRrIj4ZHuF0cRmJ5fppw4O07lDAp7pbeSwuYwvWS71 OtbEsXvkN2QGQPSJN0URt6UNDcL0mAN3B+5J2Vgvt/1OF3Q3KL851Fpd1qc3Fow6Hljc I+E+E9GAHEvmWxvTMlOxYUkiVlDLIbN8kIbL8mhP+02OhWxBk7a+ikLBKwr16ydNTumb MwGQ== X-Gm-Message-State: APjAAAUHG2ixTp5hPudKNfl3nG7rWGyHHyPO6/8aEEuhX1RCP/kCLJoS AtIfSxQkSNhtrJnZysLKL3TSgw== X-Received: by 2002:a5d:530e:: with SMTP id e14mr5659011wrv.18.1553790166922; Thu, 28 Mar 2019 09:22:46 -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 3sm34887905wrk.68.2019.03.28.09.22.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Mar 2019 09:22:46 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, matti.vaittinen@fi.rohmeurope.com, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH] regmap: regmap-irq: fix getting type default values Date: Thu, 28 Mar 2019 16:22:18 +0000 Message-Id: <20190328162218.14569-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Checking for value of type default value just after allocating will always be zero and the type register default values will never be read, so fix this! Without this patch setting irq type will be silently ignored. Patch "regmap: regmap-irq: Remove default irq type setting from core" did remove the default mask but it forgot to remove the check before reading the default type register. Fixes: 84267d1b18ab ("regmap: regmap-irq: Remove default irq type setting from core") Signed-off-by: Srinivas Kandagatla --- drivers/base/regmap/regmap-irq.c | 3 --- 1 file changed, 3 deletions(-) -- 2.21.0 Acked-by: Matti Vaittinen diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 5059748afd4c..02eb75646141 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -761,9 +761,6 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags, if (chip->num_type_reg && !chip->type_in_mask) { for (i = 0; i < chip->num_type_reg; ++i) { - if (!d->type_buf_def[i]) - continue; - reg = chip->type_base + (i * map->reg_stride * d->type_reg_stride);