From patchwork Fri Sep 9 01:21:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 12970903 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 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 AB842C54EE9 for ; Fri, 9 Sep 2022 01:22:59 +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 9D877D8; Fri, 9 Sep 2022 03:22:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9D877D8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1662686577; bh=2DEndcFhTAZJ1yiWpqi5sOiyyl7RqrmHsBrCZKJv68A=; h=From:Subject:To:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=lKzYU4v5peOGfKkzO3gxywirB39TOdP1hSg8NcN0QiqKz+B3OZjEZApvZrlw3JRsc wlE1lIygjfZY/PnD7rcqHK1GenAZ0jBXqqtqJjefKEneq2tTZ3BFOoHrPoFGR7KakH V/uspSijtRxuhj7KstlCPHE1Oh16QimU16kPbG1c= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4ED5AF8016C; Fri, 9 Sep 2022 03:22:07 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 808C1F80105; Fri, 9 Sep 2022 03:22:06 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2129.outbound.protection.outlook.com [40.107.113.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 94D77F80105 for ; Fri, 9 Sep 2022 03:21:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 94D77F80105 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="BRMxhE5b" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cJEBJ2BrSlY1fJ1OO8iPrzFMQ3RJZH5QRoqSPnuDrH93MXentV1Xvui4pLjYjZct1FoWrCrOHWZuvJskRRYclStcAKQySpdwTObyDdtz3+pUAb2jXqHePoO/o60PWH3NawWp9/McBKL4zvqtUkg36x4vrhJ66xolM+DN+AevUZpxvH0WMVDqcEfVIU6UDiXF8csSrq+piyxbT7RdNstN4Wbd6JCm38M6fkfafb+EODCFldMrhlKrI5m1lVmuUFluwRbdgATVBGh/CylamvKKOtPTyum4ppzOYZosRqK582XP/MeH15qASCZI/CQ/X+hAmMFXdWJKGzkWCQJ/NBD0lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dv92gSk6FNn4pVih3qcOOF60ZvyUVlaUp5LJGbqCp40=; b=jwu6aPXOd9g6phHYaqzX2bh2szruceU2GwDGQhf5ykZaTyCifTJBWpnGeEcx/FbE3JFALHdIVBxkamtm2DHI2zBR5TT+JKsZBz9yAiatL1S8dwGYil42B9sLk61/QIXDSjScU6IAu/OU2OGvh3uHhv1+1Titb/wmhewsHvbxrQRIV8WY6omVHpWgV4GSoCMrLwaQW7rxZ6Jjw7w4OZxN1dghkmhYAZF4xMhKsrv0lOztm5aYuvv3Q8IJGFPVjl8XqVVsJJx5hkcFbmko5v5Jhbvi2bEID4ZTG/AbbGHFZnSLNjOANefJ1T0UdOxGUYsvgTG5EbLSbu68gJdv5zkVVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dv92gSk6FNn4pVih3qcOOF60ZvyUVlaUp5LJGbqCp40=; b=BRMxhE5bS4+sZBbVbqLR74KH/O5x7Suazb/KBPc4PL0cCHSN6XD1DUOgrcTT8+1248Dk3s2xevtw1EaA5E0ZMEtsRqbBMho57mPBwMjyXTBW15QF/swhfeYl8Xa29il/qFMEBWJn7r+qqfSM1LjWiveR5SbHWSPQwjXexMf7Zds= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by OS0PR01MB5987.jpnprd01.prod.outlook.com (2603:1096:604:ce::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.12; Fri, 9 Sep 2022 01:21:53 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::1891:867b:6039:55d3]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::1891:867b:6039:55d3%6]) with mapi id 15.20.5612.019; Fri, 9 Sep 2022 01:21:53 +0000 Message-ID: <8735d1mjf3.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH] ASoC: meson: aiu-fifo.c: use devm_kzalloc(), and remove .remove function User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown Date: Fri, 9 Sep 2022 01:21:53 +0000 X-ClientProxiedBy: TYCP286CA0064.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31a::11) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|OS0PR01MB5987:EE_ X-MS-Office365-Filtering-Correlation-Id: f6075cad-fdc7-43d8-c9cc-08da9201adb4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wpiS12Y1rjfX689eaiD2BCGAjOMnU/+PcnGj0cmCfOB8D0RLlz01G476SNBD/0c4cZPudbu0sUMGuz3A5mwnozFCCJnVUHIFcRPNqWTin50sdOXXX+HlNY3rodQOpej+6ofuTDWBsAHdwaXe+K/A8CMzpoLKEzrIMySNdS9on8LCjIdtki80pkOHQFuK15sHbxEru74i/rLDiv/MB9XDheyg+Jc8SzPUBqlxuIYeBO8IQFHOCg/hAzwG2XMwhS1BuLu25v+Ptj1dqUnq+0GtLgqHfDLlP0TbT1jfYb4cJjakga+pJytIk4twwpHHMUnYIIQWKz7IX/FcbIR0cgWvvIA4A6MQFP+S8Knes2mPVRcQ6UEdIwQfKwxQHtDtzozTybX1wh1Vu6usa4Ow7K4kLv1FI1BwIq8PpflmNzuWTkKmJWcGoffpApSZA9CoOprsei4gWqDdqIMkLKz2FJLUl/n++y6v6cJAigHt9rVb5p04viwxx6cwOX/jzRTr+eqa9Tn108ctIOUXpNJ9BUu1yDgGbGt1jJ1Da8sb6fO0K7QbYxXh/W5WDCso8TnWnRkqGCJzRM1W1WDyhykuq78skko815BrD2TUq8sOBitTYIcnWs5ABV2pKSQMfBz036ZEt3O+jdxdtiFWma0PSbJnMRerby2Wngi6+fOnSNiFHc6wiSLH6nL6fUANJEiUizeiecerucCQNYK+7vAfZRq2F5TDnCJizdMvmX8Smr6qOki5kPh+fOq0Q4xupeOGBaWtXo36QgLxlGqFtji2nUjfWTL9eK/Bq+YprrBzQwzj9Xc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(396003)(346002)(366004)(39860400002)(376002)(136003)(52116002)(6506007)(26005)(6512007)(86362001)(6486002)(478600001)(41300700001)(2616005)(186003)(38100700002)(83380400001)(38350700002)(66476007)(66556008)(66946007)(36756003)(8676002)(4326008)(54906003)(6916009)(5660300002)(8936002)(2906002)(316002)(142923001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oGIGiBHTzH0gHvytdD9LciXBnUEuRmLoDhLAjJGCI3IodeuGqnAmG3wjdAFMhgHAmu13xSGxEWqQlOaAs4XfjFflIKCbZ36JQskNiDTteFTsJ2jFcz8uJIQYA3eCbFmIAGzJ4kMw7TyysPaqdNB7DUm8xiQPDiDO1KNP6snbOLpxSVgMG2MortsuWtLZO0IPz5OW4HndZJnErydyaxGVr3CSQiE0QSGConPmqp2QyvKVtM4z3pTgo2JVPtLWvB1U04V4j5t6vcI5BQyhv86scSkI30lotDMXmqEBM7eY559lQWBRwlTGC31K8d8BbUHd2QGXlGIHc9RtNz7wECvwCYSiJAD6o/WLfMoA0sFLBHuAbjYo5jVRA6pvZj7UcPaZ1Mhqqm6r/sfpdcEsQKzGo6qjay2HQjuhM8Pdcv2biGC9vGP89YYTNCRnCjZtc2yoA7uCtAB4XVQ5u7S9HXWnqa5j9yleuBYyFur8hYKF1sL4TFyjuVK4Xhibh1LGQj7gnjDri60485hyJEa6CqhN6c4AMaRxkgcL31X/5UPIMey8qNEXgxPWe8UomMAqUw9mfZXbk0VS8fvbiJaVwMUDBUFsfl320u2yVg4QMsMIm3h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-08da9201adb4 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2022 01:21:53.3900 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2mESjBDKOZnJluR8e2g9ZBEFEezcrZqebu3nB1UAiOvFDbA4Ahg1l8qmUxrQ3Pe0Ahios9yC9PDkGroxaIs2BlhADFvTbRHx8qTwBerqkAwELmyFM1V31ApOHcsE0nGN X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS0PR01MB5987 Cc: Linux-ALSA , Neil Armstrong , Martin Blumenstingl , Kevin Hilman , Jerome Brunet 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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kuninori Morimoto Current aiu-fifo.c is using kzalloc()/kfree(), but we can replace it by devm_kzalloc(), and remove kfree(). This patch do it. Signed-off-by: Kuninori Morimoto --- sound/soc/meson/aiu-fifo.c | 10 +--------- sound/soc/meson/aiu-fifo.h | 1 - sound/soc/meson/aiu.c | 2 -- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/sound/soc/meson/aiu-fifo.c b/sound/soc/meson/aiu-fifo.c index d67ff4cdabd5..843e5067e07d 100644 --- a/sound/soc/meson/aiu-fifo.c +++ b/sound/soc/meson/aiu-fifo.c @@ -196,7 +196,7 @@ int aiu_fifo_dai_probe(struct snd_soc_dai *dai) { struct aiu_fifo *fifo; - fifo = kzalloc(sizeof(*fifo), GFP_KERNEL); + fifo = devm_kzalloc(dai->dev, sizeof(*fifo), GFP_KERNEL); if (!fifo) return -ENOMEM; @@ -204,11 +204,3 @@ int aiu_fifo_dai_probe(struct snd_soc_dai *dai) return 0; } - -int aiu_fifo_dai_remove(struct snd_soc_dai *dai) -{ - kfree(dai->playback_dma_data); - - return 0; -} - diff --git a/sound/soc/meson/aiu-fifo.h b/sound/soc/meson/aiu-fifo.h index 42ce266677cc..fb323a4385f7 100644 --- a/sound/soc/meson/aiu-fifo.h +++ b/sound/soc/meson/aiu-fifo.h @@ -26,7 +26,6 @@ struct aiu_fifo { }; int aiu_fifo_dai_probe(struct snd_soc_dai *dai); -int aiu_fifo_dai_remove(struct snd_soc_dai *dai); snd_pcm_uframes_t aiu_fifo_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream); diff --git a/sound/soc/meson/aiu.c b/sound/soc/meson/aiu.c index 88e611e64d14..7e632aa31368 100644 --- a/sound/soc/meson/aiu.c +++ b/sound/soc/meson/aiu.c @@ -123,7 +123,6 @@ static struct snd_soc_dai_driver aiu_cpu_dai_drv[] = { .ops = &aiu_fifo_i2s_dai_ops, .pcm_new = aiu_fifo_pcm_new, .probe = aiu_fifo_i2s_dai_probe, - .remove = aiu_fifo_dai_remove, }, [CPU_SPDIF_FIFO] = { .name = "SPDIF FIFO", @@ -139,7 +138,6 @@ static struct snd_soc_dai_driver aiu_cpu_dai_drv[] = { .ops = &aiu_fifo_spdif_dai_ops, .pcm_new = aiu_fifo_pcm_new, .probe = aiu_fifo_spdif_dai_probe, - .remove = aiu_fifo_dai_remove, }, [CPU_I2S_ENCODER] = { .name = "I2S Encoder",