Message ID | 20220419113435.246203-12-krzysztof.kozlowski@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <alsa-devel-bounces@alsa-project.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2DF07C433F5 for <alsa-devel@archiver.kernel.org>; Tue, 19 Apr 2022 12:00:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6FBB418DF; Tue, 19 Apr 2022 13:59:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6FBB418DF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1650369629; bh=o9QJR4CyzRYxdQS8LJ2xtYX6f43psHz4CTAnevE7iP0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=SOsXybS4Cjm4JUKuVwu2gKym0n9d70O/oCizmfW9VUbrzsisZCLaObMLR7WUtdUrq 1GNXF2Etg1ilF6YTs61QaSFAi0rSKrr+t+2eUTqujE/i/8a86FYpv98k7qiB8uT4bs R7Ys3jGHTabfdj/Op5SYTU2h/EvqnToS64HqDZg4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 43F69F805D7; Tue, 19 Apr 2022 13:52:40 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ED2A6F80237; Tue, 19 Apr 2022 13:35:12 +0200 (CEST) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4ECEBF80237 for <alsa-devel@alsa-project.org>; Tue, 19 Apr 2022 13:35:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4ECEBF80237 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EpULbiMc" Received: by mail-ej1-x62c.google.com with SMTP id u15so32219269ejf.11 for <alsa-devel@alsa-project.org>; Tue, 19 Apr 2022 04:35:06 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=MZB4AAiYpghp+j0HlvXqcm6S1oaOh86fqoD06sTrQvg=; b=EpULbiMcIyvOq1eTI1FkoG7wHTnnsB+t3uW7Gr9XJVTSv6M+N6+CpqVJ4tX3TkCJmj sx+dBtweIzXDc+/elWAvba2OBrbAX04zVGMt+UVOEGyNqFedX1c7G9LuvmQ/ozIthkTq Y3/IDX3dscPP1/B9ADdZKVAGu6XTtAEaCHeesCj2xtEjHqF5DWbZVPStC3571/pmn2Bq Jc6N0AFyt8OgU0gUmyQ0UxOeUpTVrV+LWpEZXyanIUvvzGU7ES/Sw3k+CIBiihhHS8LF G+8pz++8wqbv055aZZ2wCgi1Pz812gH503ntSZGp5dxdbkotFOTkn+daw5aiX/a4Di1V uI1w== 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=MZB4AAiYpghp+j0HlvXqcm6S1oaOh86fqoD06sTrQvg=; b=5l1au1zSnQbzOUaPYnwATsxMbt+G/es3K87A4lwK/PVgLaIBzzo4cdL5+P+GdCcYje E3mjkrwg2Z9UwfDl2qYfWDBAVGvx6TgPuWv3xUVc61Ep5WjMDjf4kJU4UyV+pYDV9bMS GDs3yeeI5YH3/NTUMPjF4s2Gzl5QpfV0JrB3cJeE/pHkmRukIKiiqvrI0UMv9Y+DqxaA F6TbVefIfPCQUXne/VLu/ICUOn2VEqS4WHe86oNnq6ACAz8uzJEC39pJIx+yjWt0EmLO 54EyJRUGSP/k1cb/OfDrXvnkROQSIlkzy4hxEdBGkL7citSjluagKnqv+uCC/9iYB/z1 PCbw== X-Gm-Message-State: AOAM532iYdr2Hmwt2yMB6hL1DSHdAk+G3j1Gjt57xK4bongiWeJSbxjj VqKDUqW79FKrgpWJ4EvaMTuTrQ== X-Google-Smtp-Source: ABdhPJz5IEvGiK922/vJClBDi+mKcO5SsMUlVd7BXDUmO4dQvqIub6KWUVkwOaaikp1xnTNTPgx3tw== X-Received: by 2002:a17:907:7e92:b0:6e8:8df7:cf92 with SMTP id qb18-20020a1709077e9200b006e88df7cf92mr12502150ejc.541.1650368104852; Tue, 19 Apr 2022 04:35:04 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id ce21-20020a170906b25500b006e89869cbf9sm5608802ejb.105.2022.04.19.04.35.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 04:35:04 -0700 (PDT) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J. Wysocki" <rafael@kernel.org> Subject: [PATCH v7 11/12] rpmsg: Constify local variable in field store macro Date: Tue, 19 Apr 2022 13:34:34 +0200 Message-Id: <20220419113435.246203-12-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220419113435.246203-1-krzysztof.kozlowski@linaro.org> References: <20220419113435.246203-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 19 Apr 2022 13:52:23 +0200 Cc: linux-hyperv@vger.kernel.org, Stuart Yoder <stuyoder@gmail.com>, linux-pci@vger.kernel.org, linux-remoteproc@vger.kernel.org, alsa-devel@alsa-project.org, Peter Oberparleiter <oberpar@linux.ibm.com>, Vineeth Vijayan <vneethv@linux.ibm.com>, Alexander Gordeev <agordeev@linux.ibm.com>, "K. Y. Srinivasan" <kys@microsoft.com>, linux-clk@vger.kernel.org, linux-s390@vger.kernel.org, Wei Liu <wei.liu@kernel.org>, Stephen Hemminger <sthemmin@microsoft.com>, Dexuan Cui <decui@microsoft.com>, Andy Shevchenko <andy.shevchenko@gmail.com>, Andy Gross <agross@kernel.org>, NXP Linux Team <linux-imx@nxp.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, virtualization@lists.linux-foundation.org, Heiko Carstens <hca@linux.ibm.com>, Vasily Gorbik <gor@linux.ibm.com>, linux-arm-msm@vger.kernel.org, Haiyang Zhang <haiyangz@microsoft.com>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, Bjorn Helgaas <bhelgaas@google.com>, Bjorn Andersson <bjorn.andersson@linaro.org>, linux-arm-kernel@lists.infradead.org, Mathieu Poirier <mathieu.poirier@linaro.org>, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Sven Schnelle <svens@linux.ibm.com>, Linus Torvalds <torvalds@linux-foundation.org> X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" <alsa-devel.alsa-project.org> List-Unsubscribe: <https://mailman.alsa-project.org/mailman/options/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe> List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel/> List-Post: <mailto:alsa-devel@alsa-project.org> List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help> List-Subscribe: <https://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=subscribe> Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" <alsa-devel-bounces@alsa-project.org> |
Series |
Fix broken usage of driver_override (and kfree of static memory)
|
expand
|
diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index 79368a957d89..95fc283f6af7 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -400,7 +400,8 @@ field##_store(struct device *dev, struct device_attribute *attr, \ const char *buf, size_t sz) \ { \ struct rpmsg_device *rpdev = to_rpmsg_device(dev); \ - char *new, *old; \ + const char *old; \ + char *new; \ \ new = kstrndup(buf, sz, GFP_KERNEL); \ if (!new) \
Memory pointed by variable 'old' in field store macro is not modified, so it can be made a pointer to const. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- drivers/rpmsg/rpmsg_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)