From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADA66C433E0 for ; Mon, 25 May 2020 21:50:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 852452071C for ; Mon, 25 May 2020 21:50:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F0Dm69Md" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389295AbgEYVuO (ORCPT ); Mon, 25 May 2020 17:50:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729559AbgEYVuM (ORCPT ); Mon, 25 May 2020 17:50:12 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61406C08C5C0 for ; Mon, 25 May 2020 14:50:11 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id z6so22118523ljm.13 for ; Mon, 25 May 2020 14:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iEiJkh8NOisGzIdjA2H8Ok8XHFo6aNWnpKwvRPxnlbI=; b=F0Dm69MdRLl1SxBsFc77E4osmjMTyNBL9fquMX9me9JytXqkrntX0IB1ESMq2khzr5 yLJvt9nWa+eIDZ6fzdHAf82L5UJYn06C4sRahqCU0cBjfLoCgHmNaxq0KFTJFaRCvXhc Ftu6ItywBCl7PQFZY6hSErjbpHd5VzG+rqhCvHoAHTZ7BarMhuHbAH4mXP8hZ4WgYUZW 2VgnUpRQ+CXevOpYJQNKZiTj+SRdLTbMIa8E98zZl0B6You97hjFSK3purxPAfsjk5b0 qrLy3Fs+ur2e3NrQEFbAmjpBlKFq1GiP59sap03Fh4plngauYBQh0O0lzlGnB4lwMdw3 vavA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=iEiJkh8NOisGzIdjA2H8Ok8XHFo6aNWnpKwvRPxnlbI=; b=om//RroKLE6+8s7kz2AZS8HsW8G/IjVuIaBA/QKoFqwr6iC06Alj7Uu2ywhAnXwNW0 ZVE7kaBnMnkzsqlXFCgnPSt0/l1m0VmSnoa0dpswVKaFloIFKa3sVGuNJOGWmc7nWjtc r4IbMPuW94dfphoqemDGSFM9DwGO+0Vkn2vuXLWlUQTd92WwaSObpHnHQbYeWQsWyDbN vxEfwtj04Okd7xlj+2Lz0/vV6y4drTnC39YfQiZOIPyFUxo+xluQGXSPbLXvAD96595G wOg+QGN2hwznU4Et6Wc25h/CMbgj2dvxsoeGqzTn1f4UUjpkTViFMYu61fpbQauHGrw0 phhg== X-Gm-Message-State: AOAM532CaHPsn4GjCD/HaQp+P2v1Pss+Sbc5UrlbJR0q7bZomgzdKIw9 L72WMRwUIULKC/3kU0c0rO8= X-Google-Smtp-Source: ABdhPJyP8HJlSTai+vcBxS4V7LXTWrEOfp1rNKWJ8hrEnvT9KdNn/GE2gqtjW3JuXID/TJTQaI/afw== X-Received: by 2002:a2e:8e28:: with SMTP id r8mr13086965ljk.460.1590443409926; Mon, 25 May 2020 14:50:09 -0700 (PDT) Received: from localhost.localdomain (h-158-174-22-22.NA.cust.bahnhof.se. [158.174.22.22]) by smtp.gmail.com with ESMTPSA id e21sm3893338ljj.86.2020.05.25.14.50.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 14:50:09 -0700 (PDT) From: Rikard Falkeborn To: Joerg Roedel Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Rikard Falkeborn , Maxime Ripard , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] iommu/sun50i: Constify sun50i_iommu_ops Date: Mon, 25 May 2020 23:49:58 +0200 Message-Id: <20200525214958.30015-3-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200525214958.30015-1-rikard.falkeborn@gmail.com> References: <20200525214958.30015-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The struct sun50i_iommu_ops is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 14358 2501 64 16923 421b drivers/iommu/sun50i-iommu.o After: text data bss dec hex filename 14726 2117 64 16907 420b drivers/iommu/sun50i-iommu.o Signed-off-by: Rikard Falkeborn --- drivers/iommu/sun50i-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index 1fa09ddcebd4..fce605e96aa2 100644 --- a/drivers/iommu/sun50i-iommu.c +++ b/drivers/iommu/sun50i-iommu.c @@ -771,7 +771,7 @@ static int sun50i_iommu_of_xlate(struct device *dev, return iommu_fwspec_add_ids(dev, &id, 1); } -static struct iommu_ops sun50i_iommu_ops = { +static const struct iommu_ops sun50i_iommu_ops = { .pgsize_bitmap = SZ_4K, .attach_dev = sun50i_iommu_attach_device, .detach_dev = sun50i_iommu_detach_device, -- 2.26.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9641FC433E2 for ; Mon, 25 May 2020 23:26:30 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6FEFA2071A for ; Mon, 25 May 2020 23:26:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F0Dm69Md" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FEFA2071A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 55DFE8593F; Mon, 25 May 2020 23:26:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wIK9yzS_ki0U; Mon, 25 May 2020 23:26:28 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8D4BF859CF; Mon, 25 May 2020 23:26:28 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6DEDAC0891; Mon, 25 May 2020 23:26:28 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 95A72C016F for ; Mon, 25 May 2020 21:50:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9248586B47 for ; Mon, 25 May 2020 21:50:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SRyYC2nhqsV4 for ; Mon, 25 May 2020 21:50:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by fraxinus.osuosl.org (Postfix) with ESMTPS id C1FCA86B3B for ; Mon, 25 May 2020 21:50:11 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id q2so22121766ljm.10 for ; Mon, 25 May 2020 14:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iEiJkh8NOisGzIdjA2H8Ok8XHFo6aNWnpKwvRPxnlbI=; b=F0Dm69MdRLl1SxBsFc77E4osmjMTyNBL9fquMX9me9JytXqkrntX0IB1ESMq2khzr5 yLJvt9nWa+eIDZ6fzdHAf82L5UJYn06C4sRahqCU0cBjfLoCgHmNaxq0KFTJFaRCvXhc Ftu6ItywBCl7PQFZY6hSErjbpHd5VzG+rqhCvHoAHTZ7BarMhuHbAH4mXP8hZ4WgYUZW 2VgnUpRQ+CXevOpYJQNKZiTj+SRdLTbMIa8E98zZl0B6You97hjFSK3purxPAfsjk5b0 qrLy3Fs+ur2e3NrQEFbAmjpBlKFq1GiP59sap03Fh4plngauYBQh0O0lzlGnB4lwMdw3 vavA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=iEiJkh8NOisGzIdjA2H8Ok8XHFo6aNWnpKwvRPxnlbI=; b=Ykglgk+8cdnyPHaFE64HYCLW4mQEru9iYQnOVUSsSPOe8yN4236hov1AymRmVBHMlg iEKg6TNx9JHPdlkp/soFC/rHgQ9qNsDqM7naTHk1qIzt58sB1LH3bzX0berbOPqCGBhW xuf3J+0kK7XSQUJM9p0zHELNELVpCt7I3bAO1o3W/IizfBJghX2wK76GqVnKpHuh6kUu bsOMMZZbrhYfBFAjQpfOHSDDZkB9iX7Got9obXA7s9o3Z+cZrWEfnWgy8gPQptT0sQuI hM2xNISWdWZAl6vna2dEp8dgQNz1VcCHOnm4kqgyFKNHSvwtBYyrSzMMg7ofSSbbC34A vFbw== X-Gm-Message-State: AOAM532JapiNTPzBXhKQTM9v8fGCMoYPBnh1a1XslpROsJ41gH9H5fyn KKcdkUnmneaXmmJ7M2DCh9g= X-Google-Smtp-Source: ABdhPJyP8HJlSTai+vcBxS4V7LXTWrEOfp1rNKWJ8hrEnvT9KdNn/GE2gqtjW3JuXID/TJTQaI/afw== X-Received: by 2002:a2e:8e28:: with SMTP id r8mr13086965ljk.460.1590443409926; Mon, 25 May 2020 14:50:09 -0700 (PDT) Received: from localhost.localdomain (h-158-174-22-22.NA.cust.bahnhof.se. [158.174.22.22]) by smtp.gmail.com with ESMTPSA id e21sm3893338ljj.86.2020.05.25.14.50.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 14:50:09 -0700 (PDT) From: Rikard Falkeborn To: Joerg Roedel Subject: [PATCH 2/2] iommu/sun50i: Constify sun50i_iommu_ops Date: Mon, 25 May 2020 23:49:58 +0200 Message-Id: <20200525214958.30015-3-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200525214958.30015-1-rikard.falkeborn@gmail.com> References: <20200525214958.30015-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 25 May 2020 23:26:27 +0000 Cc: Chen-Yu Tsai , Maxime Ripard , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Rikard Falkeborn , linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" The struct sun50i_iommu_ops is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 14358 2501 64 16923 421b drivers/iommu/sun50i-iommu.o After: text data bss dec hex filename 14726 2117 64 16907 420b drivers/iommu/sun50i-iommu.o Signed-off-by: Rikard Falkeborn --- drivers/iommu/sun50i-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index 1fa09ddcebd4..fce605e96aa2 100644 --- a/drivers/iommu/sun50i-iommu.c +++ b/drivers/iommu/sun50i-iommu.c @@ -771,7 +771,7 @@ static int sun50i_iommu_of_xlate(struct device *dev, return iommu_fwspec_add_ids(dev, &id, 1); } -static struct iommu_ops sun50i_iommu_ops = { +static const struct iommu_ops sun50i_iommu_ops = { .pgsize_bitmap = SZ_4K, .attach_dev = sun50i_iommu_attach_device, .detach_dev = sun50i_iommu_detach_device, -- 2.26.2 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9660CC433E0 for ; Mon, 25 May 2020 21:50:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 291B22075F for ; Mon, 25 May 2020 21:50:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gkmjLrR0"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F0Dm69Md" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 291B22075F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AvF7UbX6tNOGneS2QKiL3Xr9H4V83K62m7gkw1xUbTg=; b=gkmjLrR07gkBJC qw9AXm/q4UHo/zJd+ywHwdBEUof3d9vm8QfG0+tfcowgEObUSzmeU7mh+AzvZ+B3WByttyX07JO4A dIT3LDRSdBnwU00DIdthfyNCPqpp9rIC0T/ARrJA+V58R4lfNI7WISeoqSkJE3hklJfEkkxQ20Ys5 GQhHvdrjNv1LSqpbseKZ1EiEBeUD+KDmVjqMMOa4ueFvgUA7a1AyM7f7USbmdYwzVgoZ2CrP8d1GJ zKWZBoMDfhtrbaTy3YnNy2R/q6gLFdvlAOdRfqSfeclaHG/sGQeTsQzCQxrM1Umjn31Iy3OBi3/sF Zr/SCvekOYALMQJRUhkw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdKzK-0000W8-6h; Mon, 25 May 2020 21:50:26 +0000 Received: from mail-lj1-f195.google.com ([209.85.208.195]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdKzA-0000NG-EJ for linux-arm-kernel@lists.infradead.org; Mon, 25 May 2020 21:50:17 +0000 Received: by mail-lj1-f195.google.com with SMTP id l15so21809342lje.9 for ; Mon, 25 May 2020 14:50:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iEiJkh8NOisGzIdjA2H8Ok8XHFo6aNWnpKwvRPxnlbI=; b=F0Dm69MdRLl1SxBsFc77E4osmjMTyNBL9fquMX9me9JytXqkrntX0IB1ESMq2khzr5 yLJvt9nWa+eIDZ6fzdHAf82L5UJYn06C4sRahqCU0cBjfLoCgHmNaxq0KFTJFaRCvXhc Ftu6ItywBCl7PQFZY6hSErjbpHd5VzG+rqhCvHoAHTZ7BarMhuHbAH4mXP8hZ4WgYUZW 2VgnUpRQ+CXevOpYJQNKZiTj+SRdLTbMIa8E98zZl0B6You97hjFSK3purxPAfsjk5b0 qrLy3Fs+ur2e3NrQEFbAmjpBlKFq1GiP59sap03Fh4plngauYBQh0O0lzlGnB4lwMdw3 vavA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=iEiJkh8NOisGzIdjA2H8Ok8XHFo6aNWnpKwvRPxnlbI=; b=oY0OCVwopUDPQSDIG2Cb03N7EkEBwsNgyi/0rh1cYh2+Mwj0yviYI31PKAcUnNu5kX Llm9/HCPRrfSEPajvtkWOAjQdvdvZggyrIBa/ks92zgXjcHR8L+Hxh13c0gvA8DkmcWr AqHINMtYgojetxoEEqcwZcowuhnUcn6kEQ2zg4iNvqPhYhESs+PuohalK5pwbNSLIImB A1o4wuVsvkwfOkCV3Uh4cjG0rtk0+DMUxojatLCtysOpZuojcQRA0gWxLZBU2E+jr4HV YtoVhxHhe1vXhOLfw5cWD0CvcNvROQcA/xffz0IczWvJZuIlAEZ4nfxEQBwcqoXtFxh4 3L5Q== X-Gm-Message-State: AOAM533tq2PmCCFkb4o3D2zxoPXrLEAqWvD+VbUuT5Dn+DP9CGwJKO7+ Rh+scRS5rAc4kEBeY+78O80= X-Google-Smtp-Source: ABdhPJyP8HJlSTai+vcBxS4V7LXTWrEOfp1rNKWJ8hrEnvT9KdNn/GE2gqtjW3JuXID/TJTQaI/afw== X-Received: by 2002:a2e:8e28:: with SMTP id r8mr13086965ljk.460.1590443409926; Mon, 25 May 2020 14:50:09 -0700 (PDT) Received: from localhost.localdomain (h-158-174-22-22.NA.cust.bahnhof.se. [158.174.22.22]) by smtp.gmail.com with ESMTPSA id e21sm3893338ljj.86.2020.05.25.14.50.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 14:50:09 -0700 (PDT) From: Rikard Falkeborn To: Joerg Roedel Subject: [PATCH 2/2] iommu/sun50i: Constify sun50i_iommu_ops Date: Mon, 25 May 2020 23:49:58 +0200 Message-Id: <20200525214958.30015-3-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200525214958.30015-1-rikard.falkeborn@gmail.com> References: <20200525214958.30015-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200525_145016_487206_09369F8D X-CRM114-Status: GOOD ( 13.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen-Yu Tsai , Maxime Ripard , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Rikard Falkeborn , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org The struct sun50i_iommu_ops is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 14358 2501 64 16923 421b drivers/iommu/sun50i-iommu.o After: text data bss dec hex filename 14726 2117 64 16907 420b drivers/iommu/sun50i-iommu.o Signed-off-by: Rikard Falkeborn --- drivers/iommu/sun50i-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index 1fa09ddcebd4..fce605e96aa2 100644 --- a/drivers/iommu/sun50i-iommu.c +++ b/drivers/iommu/sun50i-iommu.c @@ -771,7 +771,7 @@ static int sun50i_iommu_of_xlate(struct device *dev, return iommu_fwspec_add_ids(dev, &id, 1); } -static struct iommu_ops sun50i_iommu_ops = { +static const struct iommu_ops sun50i_iommu_ops = { .pgsize_bitmap = SZ_4K, .attach_dev = sun50i_iommu_attach_device, .detach_dev = sun50i_iommu_detach_device, -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel