From patchwork Mon Feb 7 21:18:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12737899 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76DCDC433EF for ; Mon, 7 Feb 2022 21:18:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235976AbiBGVS1 (ORCPT ); Mon, 7 Feb 2022 16:18:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235889AbiBGVS1 (ORCPT ); Mon, 7 Feb 2022 16:18:27 -0500 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4152AC06173B; Mon, 7 Feb 2022 13:18:26 -0800 (PST) Received: by mail-lj1-x232.google.com with SMTP id z20so21586428ljo.6; Mon, 07 Feb 2022 13:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lgr18DbTVjSE1ID/eUYZdFdfvhErb3HHLm5xvbBJepM=; b=mtg9bScP+gXWHAp+MMX0Q8txU3MWLUic9iK1a7pPjL/Rx1JpMVFiBgb3h/r20PnUyr AhVXAulMWKM2nFfJt0OSun0490VQfQcPNKW1IQKwU8RTntr7AEu4qi1aZdOH/VO/Vnrr /mzJ+V3kK7suq9wfyJX6fek88ey42+PBc+JYfEQj31Flp3HYMtHfjV3enYYqpoQtFuwO 4po7LMzjNjVF33OOLCHgWaf726GyslQRnnb9WZpNoOLcQHVlyIQLgqJaZyY6Z8aDyMoe NjM9bAfAOcqNCIaJNGIvks/hZvLqiOiByMYAhtEx0AEaCXZMTblyjcgozIggNGudK8Aj +6Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lgr18DbTVjSE1ID/eUYZdFdfvhErb3HHLm5xvbBJepM=; b=IAfnNZy9xq3NQVKE4bZePFQIWXyTeBQJEsMDpOKV0aNm0mdEr2j2ssN2kFU1TL34mB qAnJaoWFcOzXBWY+Q67VS7RYqojj/Voes4wu0ZCVSdYkKPCHT3XXowqnf5Q6mYNvSUJ/ YOgxmbyZEQ27MPDovEU80wSz5y653Yib1KOrsGh/N+JUkkQZMyHwPDJ5dsAKPikqArTg twItPcDlq0fkSAFGvj0mjwOfQ3gL6ruc8rHcE/P58fSSx0EoE7hNt28woTGZTjohvTWn ZnVJVHrCkusVFD6JsaR+2ItdBCOHB357/Ktxm78+ikK6QxFNsgWR44ZuFLN4dPel/5Mu B8Sg== X-Gm-Message-State: AOAM533ruBDXZOWgfeFL71IeMV9X0Nqw3SpjmNDKThgJAPzIgSL6e3Qw S92tTu+9tJTWl+XWwKLz1kQ= X-Google-Smtp-Source: ABdhPJzn7RBwbAMw+8YBS5Qho5rdh3V4+mjFFZghC2nf+BHTv35gSBIMo1t+Djn4dT1R2v+euGorgw== X-Received: by 2002:a2e:94cf:: with SMTP id r15mr850226ljh.492.1644268704671; Mon, 07 Feb 2022 13:18:24 -0800 (PST) Received: from localhost.localdomain (h-155-4-221-129.NA.cust.bahnhof.se. [155.4.221.129]) by smtp.gmail.com with ESMTPSA id s30sm1637978lfp.93.2022.02.07.13.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 13:18:24 -0800 (PST) From: Rikard Falkeborn To: Thomas Bogendoerfer Cc: Marc Zyngier , Mark Rutland , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Rikard Falkeborn Subject: [PATCH 1/3] MIPS: OCTEON: Constify static irq_domain_ops Date: Mon, 7 Feb 2022 22:18:14 +0100 Message-Id: <20220207211816.57860-2-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220207211816.57860-1-rikard.falkeborn@gmail.com> References: <20220207211816.57860-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org The only usage of these structs is to pass their address to either irq_domain_add_tree() or irq_domain_create_linear(), both which takes pointers to const struct irq_domain_ops. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- arch/mips/cavium-octeon/octeon-irq.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c index 844f882096e6..07d7ff5a981d 100644 --- a/arch/mips/cavium-octeon/octeon-irq.c +++ b/arch/mips/cavium-octeon/octeon-irq.c @@ -1274,13 +1274,13 @@ static int octeon_irq_gpio_map(struct irq_domain *d, return r; } -static struct irq_domain_ops octeon_irq_domain_ciu_ops = { +static const struct irq_domain_ops octeon_irq_domain_ciu_ops = { .map = octeon_irq_ciu_map, .unmap = octeon_irq_free_cd, .xlate = octeon_irq_ciu_xlat, }; -static struct irq_domain_ops octeon_irq_domain_gpio_ops = { +static const struct irq_domain_ops octeon_irq_domain_gpio_ops = { .map = octeon_irq_gpio_map, .unmap = octeon_irq_free_cd, .xlate = octeon_irq_gpio_xlat, @@ -1974,7 +1974,7 @@ static int octeon_irq_ciu2_map(struct irq_domain *d, return 0; } -static struct irq_domain_ops octeon_irq_domain_ciu2_ops = { +static const struct irq_domain_ops octeon_irq_domain_ciu2_ops = { .map = octeon_irq_ciu2_map, .unmap = octeon_irq_free_cd, .xlate = octeon_irq_ciu2_xlat, @@ -2226,7 +2226,7 @@ static int octeon_irq_cib_map(struct irq_domain *d, return 0; } -static struct irq_domain_ops octeon_irq_domain_cib_ops = { +static const struct irq_domain_ops octeon_irq_domain_cib_ops = { .map = octeon_irq_cib_map, .unmap = octeon_irq_free_cd, .xlate = octeon_irq_cib_xlat, @@ -2578,7 +2578,7 @@ static int octeon_irq_ciu3_map(struct irq_domain *d, return octeon_irq_ciu3_mapx(d, virq, hw, &octeon_irq_chip_ciu3); } -static struct irq_domain_ops octeon_dflt_domain_ciu3_ops = { +static const struct irq_domain_ops octeon_dflt_domain_ciu3_ops = { .map = octeon_irq_ciu3_map, .unmap = octeon_irq_free_cd, .xlate = octeon_irq_ciu3_xlat, From patchwork Mon Feb 7 21:18:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12737900 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F09BAC433EF for ; Mon, 7 Feb 2022 21:18:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237574AbiBGVSa (ORCPT ); Mon, 7 Feb 2022 16:18:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235889AbiBGVSa (ORCPT ); Mon, 7 Feb 2022 16:18:30 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E7E0C061A73; Mon, 7 Feb 2022 13:18:27 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id b9so29396740lfq.6; Mon, 07 Feb 2022 13:18:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3/Udx6MddBj6XcwtiKZbyxOoOI1dz9F34GThp2Ze/lo=; b=jgnmEPVa6cXu53T2QFDLqTGX7FoYOgHfXmNdJdqJeFWrKmoj7EEmes0Yldm25nEznu XFhERP/WQxELdmBp7V9+WQC1ENa1yFryCZbBptkZZ7fHbsUToR/l69i7YugmMi9byOcD QAwJBDKffCF4vdaeXLPjucidYmE1JBAq4NgMJ6JA520GwIgid00snN3MgctO7mUUI4Z4 wRySp0shp/0c0D367Vh0ZFLEpDygTAJzre3uIrnUIj3I5OHULJNLpBXD8E824Ro7Slmw m9sHBrArwb7cLOViCSp9CdOa4+fQBPzNK8WSTpFLXEqVrMGPqtKQFqX2lT9bWFEgohDO qEMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3/Udx6MddBj6XcwtiKZbyxOoOI1dz9F34GThp2Ze/lo=; b=yhC+UmhcRBR1H38I65vpLZAVqpyuzjwGJTP2VygaecGRYMjnfGZwyU9NcsS7ayBinU zeHMuOv8DngfZHij0qWE+wl0pv4qA5i6DqAi8l4Iq4oPe9ctdKJmeoCuS4x0tr58nIde ccas+BE/cAJzLxeJRhFhl412wM/j3gGcXkazLhdD1/1XLGv6s+wH/frzsuIWYNx3j5gP EjgY7tzj9U4Plou5R0tkyU8k/RPDlQKnTAZAbARp+QWlBsBhhKEGhfnc7KwTMmZaU63c mLRU3jcRKlsloTGZq4fD5cC8U9cTgTpSINYfBw7rZP0GWpUcbi0YCtt20E17xYEszeN3 xI7g== X-Gm-Message-State: AOAM531UHj+ylmQeiIFLDTJ9FYASVA6xRhnsZlAlk0OsuhZxTEEmGKeK 6nppPxTJKRAr/ZhOXuK7A6g= X-Google-Smtp-Source: ABdhPJwIa3zb4Y2vMPdilUAVSz4mIshUs3AGvEq8zwidaVLIK7J0SEJgv7/4jhBttwhtSnO2yns6dw== X-Received: by 2002:a05:6512:131b:: with SMTP id x27mr479943lfu.96.1644268705666; Mon, 07 Feb 2022 13:18:25 -0800 (PST) Received: from localhost.localdomain (h-155-4-221-129.NA.cust.bahnhof.se. [155.4.221.129]) by smtp.gmail.com with ESMTPSA id s30sm1637978lfp.93.2022.02.07.13.18.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 13:18:25 -0800 (PST) From: Rikard Falkeborn To: Thomas Bogendoerfer Cc: Marc Zyngier , Mark Rutland , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Rikard Falkeborn Subject: [PATCH 2/3] MIPS: ath25: Constify static irq_domain_ops Date: Mon, 7 Feb 2022 22:18:15 +0100 Message-Id: <20220207211816.57860-3-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220207211816.57860-1-rikard.falkeborn@gmail.com> References: <20220207211816.57860-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org The only usage of these structs is to pass their address to either irq_domain_add_tree() or irq_domain_create_linear(), both which takes pointers to const struct irq_domain_ops. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- arch/mips/ath25/ar2315.c | 2 +- arch/mips/ath25/ar5312.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/ath25/ar2315.c b/arch/mips/ath25/ar2315.c index 76e43a73ba1b..8ccf167c167e 100644 --- a/arch/mips/ath25/ar2315.c +++ b/arch/mips/ath25/ar2315.c @@ -112,7 +112,7 @@ static int ar2315_misc_irq_map(struct irq_domain *d, unsigned irq, return 0; } -static struct irq_domain_ops ar2315_misc_irq_domain_ops = { +static const struct irq_domain_ops ar2315_misc_irq_domain_ops = { .map = ar2315_misc_irq_map, }; diff --git a/arch/mips/ath25/ar5312.c b/arch/mips/ath25/ar5312.c index 822b639dbd1e..cfa103518113 100644 --- a/arch/mips/ath25/ar5312.c +++ b/arch/mips/ath25/ar5312.c @@ -116,7 +116,7 @@ static int ar5312_misc_irq_map(struct irq_domain *d, unsigned irq, return 0; } -static struct irq_domain_ops ar5312_misc_irq_domain_ops = { +static const struct irq_domain_ops ar5312_misc_irq_domain_ops = { .map = ar5312_misc_irq_map, }; From patchwork Mon Feb 7 21:18:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12737901 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 445AAC433EF for ; Mon, 7 Feb 2022 21:18:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237969AbiBGVSd (ORCPT ); Mon, 7 Feb 2022 16:18:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237529AbiBGVSa (ORCPT ); Mon, 7 Feb 2022 16:18:30 -0500 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57559C06173B; Mon, 7 Feb 2022 13:18:28 -0800 (PST) Received: by mail-lj1-x22b.google.com with SMTP id bx31so21645750ljb.0; Mon, 07 Feb 2022 13:18:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SYwVTByFSLm7YfC3rAtEhcduxeMNVifR9e2i3wvgr5g=; b=HqAim6ROW3H3RAUI6JqmL46IYzKE9NlDOTRG6J1xu043L3eH5tNcsDO5lQjrZfNFgJ GhM77obAQc7YIPLNXlTURP1HIuraaMdatOdYqaXxJGJY+ZJgtPNcAgen6YozHme8mrql bW7QR02ATyEI/m7h7Fx4Ab7/qMsaS5wZ7qPQgy4pddSyqUk/F+Yeq+6GyvaQ2WhBrmbX nhD2PqWeVO2BEs+/g6sohr6mCkfGxb8SjbDWSlpPLyQdTHxRLeT6CvhU0RH3H8x060Jo gNe6CL1hgDJMfrRhWVS1OrINPwYX5CfaaZHrpLQVLEtR+PiFwVoOsp3MzAYcJ89AB9SI o4Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SYwVTByFSLm7YfC3rAtEhcduxeMNVifR9e2i3wvgr5g=; b=yjGTb80SiGIvnJlq8cOCAIvqsgQLAUdv8pSR/pVrYwze8fiyxFsn83gDW83LA0GQkE a99xWqHTTewYCwEIrMJAjp7HaxDR8AfsppHONTCdM9xdrfIlD/q+sxDwSoDgipq+rz+a WBNhxBoHcL7yTqdHPSKJIHizpzP8dxYgQB4VBAdf9Nk4HZVXhZ3c+VL60vViBOkNM+WK c9c8ILCY7eq7NAQnnbWToioGfQfgAk6UcZsb5N3PV+DjSf6FXRJssWN9fYMjqkF16N9Y 7qzUfybu3pzSY9piAQP+pjJ2QZxY2Qvj58uVrQVFnOCoB6M2zCmvDfsEQf5Kv2Br7wKZ 6iKw== X-Gm-Message-State: AOAM531eJv5jgKi5r/pR1UL0VNOxvuc+au+yO7/m0IPjX+q6QKAZertr T7oBmaKqQ2Q65+5EeMM51zCAGWfvaqY= X-Google-Smtp-Source: ABdhPJxJnDWK5HUMhRsEhRXhMQsYpWkkEB1uDMpYiQjTEZQV8KDCiaAg3X+1t3NRXPlgeeackAA/ZQ== X-Received: by 2002:a2e:150d:: with SMTP id s13mr836466ljd.468.1644268706628; Mon, 07 Feb 2022 13:18:26 -0800 (PST) Received: from localhost.localdomain (h-155-4-221-129.NA.cust.bahnhof.se. [155.4.221.129]) by smtp.gmail.com with ESMTPSA id s30sm1637978lfp.93.2022.02.07.13.18.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 13:18:26 -0800 (PST) From: Rikard Falkeborn To: Thomas Bogendoerfer Cc: Marc Zyngier , Mark Rutland , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Rikard Falkeborn Subject: [PATCH 3/3] MIPS: pci-ar2315: Constify static irq_domain_ops Date: Mon, 7 Feb 2022 22:18:16 +0100 Message-Id: <20220207211816.57860-4-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220207211816.57860-1-rikard.falkeborn@gmail.com> References: <20220207211816.57860-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org The only usage of ar2315_pci_irq_domain_ops is to pass its address to irq_domain_add_linear() which takes a pointer to const struct irq_domain_ops. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- arch/mips/pci/pci-ar2315.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/pci/pci-ar2315.c b/arch/mips/pci/pci-ar2315.c index 9a4bfb4e63e3..30e0922f4cea 100644 --- a/arch/mips/pci/pci-ar2315.c +++ b/arch/mips/pci/pci-ar2315.c @@ -384,7 +384,7 @@ static int ar2315_pci_irq_map(struct irq_domain *d, unsigned irq, return 0; } -static struct irq_domain_ops ar2315_pci_irq_domain_ops = { +static const struct irq_domain_ops ar2315_pci_irq_domain_ops = { .map = ar2315_pci_irq_map, };