From patchwork Fri Dec 25 00:21:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 11989781 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=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 CBB16C433E0 for ; Fri, 25 Dec 2020 00:22:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id DB5D820E65 for ; Fri, 25 Dec 2020 00:22:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB5D820E65 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 E6A2717E1; Fri, 25 Dec 2020 01:21:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E6A2717E1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1608855769; bh=iPp3HEKtLp5w8p3bNkqoTzwCgeozP/+bKyKQKJUK61U=; h=Date:From:Subject:To:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Bc6NJ457NhZZ6V+EGXcWO6gUHdhWDssMJKj5sezAokiC6PX4agfD1FvYGbFdA5K3J GmsahLFxp7KZNTAp/2sBBucAyTYQp659dh+T5TZyDjfyncWJnEwUMwmm2vKgU74Kuz pMC9uiWB8qYrELVgfnYKeiqIPGw7w1EOSPUixBYQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7A696F800BC; Fri, 25 Dec 2020 01:21:58 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 646A7F80224; Fri, 25 Dec 2020 01:21:57 +0100 (CET) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 8F06EF800BC for ; Fri, 25 Dec 2020 01:21:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8F06EF800BC Date: 25 Dec 2020 09:21:43 +0900 X-IronPort-AV: E=Sophos;i="5.78,446,1599490800"; d="scan'208";a="67091212" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 25 Dec 2020 09:21:43 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 41EBD40078AC; Fri, 25 Dec 2020 09:21:43 +0900 (JST) Message-ID: <878s9m212i.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH] ALSA: pcm: use bit field on snd_pcm User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Takashi Iwai MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA 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 snd_pcm's internal, nonatomic, no_device_suspend are defined as bool. But we can reduce struct size if we use bit field for these. This patch converts these. Signed-off-by: Kuninori Morimoto --- include/sound/pcm.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 2336bf9243e1..e836741d2708 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -520,12 +520,13 @@ struct snd_pcm { wait_queue_head_t open_wait; void *private_data; void (*private_free) (struct snd_pcm *pcm); - bool internal; /* pcm is for internal use only */ - bool nonatomic; /* whole PCM operations are in non-atomic context */ - bool no_device_suspend; /* don't invoke device PM suspend */ #if IS_ENABLED(CONFIG_SND_PCM_OSS) struct snd_pcm_oss oss; #endif + /* bit field */ + unsigned int internal:1; /* pcm is for internal use only */ + unsigned int nonatomic:1; /* whole PCM operations are in non-atomic context */ + unsigned int no_device_suspend:1; /* don't invoke device PM suspend */ }; /*