From patchwork Tue Jan 7 15:56:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 13929233 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B65301EE00F for ; Tue, 7 Jan 2025 15:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265421; cv=none; b=H683/dyKLjYEqVWEl49YfbOttnfFJ/98sc5BVUdipdHMQOMXL/l6wJ4v+eq0G2XFegEXYEfr1rJx6278nCmfvQ0Ho13VhoYmvSVU00L9ve48ISPyPkbnov5qtegnmEM8CWcrrl6wgxpzFtQFBlMF/9U+m8FkyCcmGTufoyC73h0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265421; c=relaxed/simple; bh=lpVLGA+7YBow246+K30GFg/wQxbW7bWLK0ulMFaigCY=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZYHUpeit1CfX1REVS0kW02q7jxIEuD+lgsH8qosoF+NcMSsD8vXtKIpqVTyia1OI+oL/PA6HxsT/H1qOOeI/6w5uP/bl+ViLtOr9FJA+oYDes/4f3axB27FpSTI+4eqoDF1WDh5xA8qM7sgVcOYEKwlJqujZ1NbHfjx5VWymN9c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=FvvcYADP; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Y0cQe4Zw; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=mLJyekPf; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=pCaMQW1O; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="FvvcYADP"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Y0cQe4Zw"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mLJyekPf"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="pCaMQW1O" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DD7B12110A; Tue, 7 Jan 2025 15:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c2BTJaxm5hvUc1ED98T9BhZWoL3l2QqIzW+eo9y4JwQ=; b=FvvcYADPKdPK/exQ1eDV65HqK3La3ini+QeBopK95BXqklMGzyLIbpZEXt0ET+U+s5VHmQ QyfNaV9p6uzitjqA1c6QtW2MxO5I9fs6s4nnnH2B114pYEKv8vn1VEQjALEl2r6QrA/28M kujZZ3XCgy7Y/Okr7AEiUYQxWIcAShU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c2BTJaxm5hvUc1ED98T9BhZWoL3l2QqIzW+eo9y4JwQ=; b=Y0cQe4ZwU4ZqYnXX/oyqZ3I+e579ToxTXYcWsZi3Hvqc/W6oytwXltvjnVKiFwT3GiU7I4 EbplYNe3s7zZ+NDw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265414; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c2BTJaxm5hvUc1ED98T9BhZWoL3l2QqIzW+eo9y4JwQ=; b=mLJyekPfokRgvGf526DXbDbU5QkQdBGefwvHTygJ5ByG+7zJmNqBj4ijP9l9PjSSKc9PI1 3R0bh14MgOnNvgHbDEEGIt/Z242JvQHIp+5XxXDSJfkpLazWgniBcy/KiFgRKCmmYmdZ33 UUhc4HkuoNmCXo3OPURlatYl2PR78gU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265414; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c2BTJaxm5hvUc1ED98T9BhZWoL3l2QqIzW+eo9y4JwQ=; b=pCaMQW1Oos3rS9WlfS5Uzj3tIRkNCpQTbgX5c8NGaZhfe+niqC7YkPlWaXgmeWBWCDCaYh 3lHpyRPXrWd+HSAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id BF45B13AA7; Tue, 7 Jan 2025 15:56:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id KM92LcZOfWfNUwAAD6G6ig (envelope-from ); Tue, 07 Jan 2025 15:56:54 +0000 From: Takashi Iwai To: linux-sound@vger.kernel.org Subject: [PATCH 1/7] ALSA: trident: Simplify with str_on_off() Date: Tue, 7 Jan 2025 16:56:31 +0100 Message-ID: <20250107155641.4435-2-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250107155641.4435-1-tiwai@suse.de> References: <20250107155641.4435-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the standard helper str_on_off() to simplify the code. Only code refactoring, no behavior change. Signed-off-by: Takashi Iwai --- sound/pci/trident/trident_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index e98eea1e6d81..8039f445bee2 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c @@ -3278,9 +3278,9 @@ static void snd_trident_proc_read(struct snd_info_entry *entry, snd_iprintf(buffer, "Spurious IRQs : %d\n", trident->spurious_irq_count); snd_iprintf(buffer, "Spurious IRQ dlta: %d\n", trident->spurious_irq_max_delta); if (trident->device == TRIDENT_DEVICE_ID_NX || trident->device == TRIDENT_DEVICE_ID_SI7018) - snd_iprintf(buffer, "IEC958 Mixer Out : %s\n", trident->spdif_ctrl == 0x28 ? "on" : "off"); + snd_iprintf(buffer, "IEC958 Mixer Out : %s\n", str_on_off(trident->spdif_ctrl == 0x28)); if (trident->device == TRIDENT_DEVICE_ID_NX) { - snd_iprintf(buffer, "Rear Speakers : %s\n", trident->ac97_ctrl & 0x00000010 ? "on" : "off"); + snd_iprintf(buffer, "Rear Speakers : %s\n", str_on_off(trident->ac97_ctrl & 0x00000010)); if (trident->tlb.entries) { snd_iprintf(buffer,"\nVirtual Memory\n"); snd_iprintf(buffer, "Memory Maximum : %d\n", trident->tlb.memhdr->size); From patchwork Tue Jan 7 15:56:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 13929228 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B658F1EE7BB for ; Tue, 7 Jan 2025 15:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265419; cv=none; b=L2ycN+/2mh8Wv1gF9yeLdpq12d8ze5Ot/3S4Nl0al5VpjQXbpk/6AD4AQeqJi341p8R40zNYsFYVW5eC/M48omsx5QRXwM/pR0Y2zTvQZK38smbDI/WSTD3u3lz3CF65mm0PgBvyDJYIExp12AZtjNV/6YKdP4cC0QCaAet+Sdc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265419; c=relaxed/simple; bh=ZegdAIqFKW2jEgQ7GqJc2P0uQKVc45beuHCj+TFuhEc=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eTUE5lFd3qL8kD7imfts1ahAikTZ2QWX9pAbhjoSb+Ba/8j1LLorUkkgo7TWgq5gkCr71RDCYAio0Sx2lkherG8kWG1QO/VGRHt61NX09JuP0slmqVqe88dIqUF6vlwkVPEkfnPNRgKX83Y1+2z6MufoPXtDKGf/imQZgcTnYhw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=te86+g+m; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=BtAlS4vj; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=te86+g+m; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=BtAlS4vj; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="te86+g+m"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="BtAlS4vj"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="te86+g+m"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="BtAlS4vj" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 141AD21133; Tue, 7 Jan 2025 15:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rezG/It3Zg1CYWIxSo60TVo/IQwS0w1r98HDwwCLATU=; b=te86+g+mAfxukRj62PMOwfkYjXaaYhtzZzSD5fVy39v7c8Q9yTET6NYapvniok7Jel/OqU 6ERxJsZXuhxSIKMYSNf7y7PK++T2ahVGRxikZbqSrUEYRmrkPFU46On/vpJL09yVMtE75i N2svRVSf9Co2YUUKvuzYXfGzZRGWYKw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rezG/It3Zg1CYWIxSo60TVo/IQwS0w1r98HDwwCLATU=; b=BtAlS4vjdu6chzzVKlk+2/8qvU52lmkpVuofc4UbSUFsrK9E2QZthE9DB3DLL+8Jdl65k1 RH6kQHRvZEgWAzBA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=te86+g+m; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=BtAlS4vj DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rezG/It3Zg1CYWIxSo60TVo/IQwS0w1r98HDwwCLATU=; b=te86+g+mAfxukRj62PMOwfkYjXaaYhtzZzSD5fVy39v7c8Q9yTET6NYapvniok7Jel/OqU 6ERxJsZXuhxSIKMYSNf7y7PK++T2ahVGRxikZbqSrUEYRmrkPFU46On/vpJL09yVMtE75i N2svRVSf9Co2YUUKvuzYXfGzZRGWYKw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rezG/It3Zg1CYWIxSo60TVo/IQwS0w1r98HDwwCLATU=; b=BtAlS4vjdu6chzzVKlk+2/8qvU52lmkpVuofc4UbSUFsrK9E2QZthE9DB3DLL+8Jdl65k1 RH6kQHRvZEgWAzBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E168313ABF; Tue, 7 Jan 2025 15:56:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id iE5ENcZOfWfNUwAAD6G6ig (envelope-from ); Tue, 07 Jan 2025 15:56:54 +0000 From: Takashi Iwai To: linux-sound@vger.kernel.org Subject: [PATCH 2/7] ALSA: sonicvibes: Simplify with str_off_on() Date: Tue, 7 Jan 2025 16:56:32 +0100 Message-ID: <20250107155641.4435-3-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250107155641.4435-1-tiwai@suse.de> References: <20250107155641.4435-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 141AD21133 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; ASN(0.00)[asn:25478, ipnet:::/0, country:RU]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the standard helper str_off_on() to simplify the code. Only code refactoring, no behavior change. Signed-off-by: Takashi Iwai --- sound/pci/sonicvibes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index e510715a6c95..c30eaf1038e7 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c @@ -1118,7 +1118,7 @@ static void snd_sonicvibes_proc_read(struct snd_info_entry *entry, tmp = sonic->srs_space & 0x0f; snd_iprintf(buffer, "SRS 3D : %s\n", - sonic->srs_space & 0x80 ? "off" : "on"); + str_off_on(sonic->srs_space & 0x80)); snd_iprintf(buffer, "SRS Space : %s\n", tmp == 0x00 ? "100%" : tmp == 0x01 ? "75%" : From patchwork Tue Jan 7 15:56:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 13929230 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A3431EE003 for ; Tue, 7 Jan 2025 15:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265420; cv=none; b=op5uoI5wCMMdnSwg65vAMMaKvjJ0Kqmicn45qERDH6sa6JS/luYNWHgTJZjZgAl01JFhNSxMrrxgHEhVOY7SHHDfyo0qI7etJof+OkDU84RDuAxFIZknlgHEf/1aZ1/9vlZbljk51UDVXKbOF22Dp0aW90HnClGiFIjyN0v7Jqo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265420; c=relaxed/simple; bh=giHfslGP76I4GmcF6KHVIn+2pGyJ1KuJ6YXMXYBQs/c=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WcBneuEbnIqI8XrlSa9+QdIVEAJ6JZyrlpuU17MKtXXk3mby0ac4Qv9bWhiHZHOsLt9VltYyFWOFB+qYBy8AO+cnuzAv+FjzsjbsiKgS7jYzFt2+BvOWRUQB6pGDX30c96ACH+LObtM7AHF/syrLSkfJs90wkb7xIL0Ep7wYy7k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=tE7W9dLl; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Iuj6CpRK; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=tE7W9dLl; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Iuj6CpRK; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="tE7W9dLl"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Iuj6CpRK"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="tE7W9dLl"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Iuj6CpRK" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 30B8B21157; Tue, 7 Jan 2025 15:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ki4Q+uYxqD9SXoVT7Q9rr9o3mo2nCySSxnVCqy54rvc=; b=tE7W9dLlQKqjyT7aX/KYQPbCQnDplDFYLcesAlsdCKY7+GGYjm3NHgAyNQqW9A0PeUVQh0 UxPCPVM2qhMBjwmJtvy6vuN1jedTdY8rSeUh/KXUZpsoo6DiSJiXi+EwFSbkaKhP+/AU2O dHtULNPhg0z92BDnxqxyD/hQhzQCBak= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ki4Q+uYxqD9SXoVT7Q9rr9o3mo2nCySSxnVCqy54rvc=; b=Iuj6CpRKcPhlWL/LIwpdc9E4EwopNBF+pJLXRl0dt2hnqNael8sLH8LuqElusuK4sKIGky nqA7qsO9vlbWbZCg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ki4Q+uYxqD9SXoVT7Q9rr9o3mo2nCySSxnVCqy54rvc=; b=tE7W9dLlQKqjyT7aX/KYQPbCQnDplDFYLcesAlsdCKY7+GGYjm3NHgAyNQqW9A0PeUVQh0 UxPCPVM2qhMBjwmJtvy6vuN1jedTdY8rSeUh/KXUZpsoo6DiSJiXi+EwFSbkaKhP+/AU2O dHtULNPhg0z92BDnxqxyD/hQhzQCBak= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ki4Q+uYxqD9SXoVT7Q9rr9o3mo2nCySSxnVCqy54rvc=; b=Iuj6CpRKcPhlWL/LIwpdc9E4EwopNBF+pJLXRl0dt2hnqNael8sLH8LuqElusuK4sKIGky nqA7qsO9vlbWbZCg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1778113A9E; Tue, 7 Jan 2025 15:56:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id +F6GBMdOfWfNUwAAD6G6ig (envelope-from ); Tue, 07 Jan 2025 15:56:55 +0000 From: Takashi Iwai To: linux-sound@vger.kernel.org Subject: [PATCH 3/7] ALSA: hdspm: Simplify with str_on_off() Date: Tue, 7 Jan 2025 16:56:33 +0100 Message-ID: <20250107155641.4435-4-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250107155641.4435-1-tiwai@suse.de> References: <20250107155641.4435-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the standard helper str_on_off() to simplify the code. Only code refactoring, no behavior change. Signed-off-by: Takashi Iwai --- sound/pci/rme9652/hdspm.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index d7290463d654..f89718b19d23 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -4927,14 +4927,14 @@ snd_hdspm_proc_read_madi(struct snd_info_entry *entry, x, (unsigned long) hdspm->period_bytes); snd_iprintf(buffer, "Line out: %s\n", - (hdspm->control_register & HDSPM_LineOut) ? "on " : "off"); + str_on_off(hdspm->control_register & HDSPM_LineOut)); snd_iprintf(buffer, "ClearTrackMarker = %s, Transmit in %s Channel Mode, " "Auto Input %s\n", - (hdspm->control_register & HDSPM_clr_tms) ? "on" : "off", + str_on_off(hdspm->control_register & HDSPM_clr_tms), (hdspm->control_register & HDSPM_TX_64ch) ? "64" : "56", - (hdspm->control_register & HDSPM_AutoInp) ? "on" : "off"); + str_on_off(hdspm->control_register & HDSPM_AutoInp)); if (!(hdspm->control_register & HDSPM_ClockModeMaster)) @@ -5088,12 +5088,9 @@ snd_hdspm_proc_read_aes32(struct snd_info_entry * entry, snd_iprintf(buffer, "ClearTrackMarker %s, Emphasis %s, Dolby %s\n", - (hdspm-> - control_register & HDSPM_clr_tms) ? "on" : "off", - (hdspm-> - control_register & HDSPM_Emphasis) ? "on" : "off", - (hdspm-> - control_register & HDSPM_Dolby) ? "on" : "off"); + str_on_off(hdspm->control_register & HDSPM_clr_tms), + str_on_off(hdspm->control_register & HDSPM_Emphasis), + str_on_off(hdspm->control_register & HDSPM_Dolby)); pref_syncref = hdspm_pref_sync_ref(hdspm); From patchwork Tue Jan 7 15:56:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 13929231 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19A7F1F131A for ; Tue, 7 Jan 2025 15:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265420; cv=none; b=TAOKkIjSld643hbmFLu9YkWF/PzomwkR+K0ScRYiBWSgDUjUfSIQEGFS4KvXccFT4NOIc411rEYNbh1HK4YdhXCa+htfGKOIWHq43VOa+54W2BZGiV722ODJWOL5c7KyMyaupUGXmcqAEIy8PD1kRIlMNYFE2WOd7F1yYKs07ms= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265420; c=relaxed/simple; bh=ToRvm/jV6OhA7YmdjSaQzAzjfS6mtpO8R0x3qDVN7s8=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FkSpL7lzAdKMcihasCKxut4YOQK5jgi26RPhDlsYH1jCs8mqgS7yV/SazXXKSasasdjBYMDhp0PdjqYsE+AH6LLynDPXX/HtjFTOJ4pY5IihQ+AcmxksSuOZXalzkkElsvRsZXRHxcHX1tkd0RoaNf9cmVqRCrvVwcG1O393JQg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=oPm6XPu3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=joC6vwlQ; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=oPm6XPu3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=joC6vwlQ; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="oPm6XPu3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="joC6vwlQ"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="oPm6XPu3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="joC6vwlQ" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5135921158; Tue, 7 Jan 2025 15:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dZFpSU9d1xwTeym0jUmvNo8Gk/ks0ulEuzPjve5BMb0=; b=oPm6XPu3iB7VvrxiXmrIdnFk/DE2DR65I44Atn9r+yCabU/RPxh9OicTVVI6RAGihIhItG uDz9qD/2bPKjoCXiDGBmgsV/I15p6o9apI+ouTTT7a8U61YwPx1gQYEtM0DfcyVAx2DNZ+ qJrHExhrOqNwAB94tiXmn/29t7n4Brs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dZFpSU9d1xwTeym0jUmvNo8Gk/ks0ulEuzPjve5BMb0=; b=joC6vwlQazRKYnWtbGBe6uYL2DZCDGc5LXOCxhZ4UDF4Q3HKQ9nUIp7SJU9D81iSjMw4SL JUj62aMfNgieSPBg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=oPm6XPu3; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=joC6vwlQ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dZFpSU9d1xwTeym0jUmvNo8Gk/ks0ulEuzPjve5BMb0=; b=oPm6XPu3iB7VvrxiXmrIdnFk/DE2DR65I44Atn9r+yCabU/RPxh9OicTVVI6RAGihIhItG uDz9qD/2bPKjoCXiDGBmgsV/I15p6o9apI+ouTTT7a8U61YwPx1gQYEtM0DfcyVAx2DNZ+ qJrHExhrOqNwAB94tiXmn/29t7n4Brs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dZFpSU9d1xwTeym0jUmvNo8Gk/ks0ulEuzPjve5BMb0=; b=joC6vwlQazRKYnWtbGBe6uYL2DZCDGc5LXOCxhZ4UDF4Q3HKQ9nUIp7SJU9D81iSjMw4SL JUj62aMfNgieSPBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3780813A6A; Tue, 7 Jan 2025 15:56:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id QBM3DMdOfWfNUwAAD6G6ig (envelope-from ); Tue, 07 Jan 2025 15:56:55 +0000 From: Takashi Iwai To: linux-sound@vger.kernel.org Subject: [PATCH 4/7] ALSA: emu10k1: Simplify with str_on_off() Date: Tue, 7 Jan 2025 16:56:34 +0100 Message-ID: <20250107155641.4435-5-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250107155641.4435-1-tiwai@suse.de> References: <20250107155641.4435-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 5135921158 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:25478, ipnet:::/0, country:RU]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_ONE(0.00)[1]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the standard helper str_on_off() to simplify the code. Only code refactoring, no behavior change. Signed-off-by: Takashi Iwai --- sound/pci/emu10k1/emuproc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c index 737c28d31b41..47448750f334 100644 --- a/sound/pci/emu10k1/emuproc.c +++ b/sound/pci/emu10k1/emuproc.c @@ -46,9 +46,9 @@ static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu, if (rate_reg > 0) { rate = snd_emu10k1_ptr_read(emu, rate_reg, 0); - snd_iprintf(buffer, "S/PDIF Valid : %s\n", rate & SRCS_SPDIFVALID ? "on" : "off"); - snd_iprintf(buffer, "S/PDIF Locked : %s\n", rate & SRCS_SPDIFLOCKED ? "on" : "off"); - snd_iprintf(buffer, "Rate Locked : %s\n", rate & SRCS_RATELOCKED ? "on" : "off"); + snd_iprintf(buffer, "S/PDIF Valid : %s\n", str_on_off(rate & SRCS_SPDIFVALID)); + snd_iprintf(buffer, "S/PDIF Locked : %s\n", str_on_off(rate & SRCS_SPDIFLOCKED)); + snd_iprintf(buffer, "Rate Locked : %s\n", str_on_off(rate & SRCS_RATELOCKED)); /* From ((Rate * 48000 ) / 262144); */ snd_iprintf(buffer, "Estimated Sample Rate : %d\n", ((rate & 0xFFFFF ) * 375) >> 11); } @@ -208,7 +208,7 @@ static void snd_emu10k1_proc_spdif_read(struct snd_info_entry *entry, #if 0 val = snd_emu10k1_ptr_read(emu, ZVSRCS, 0); snd_iprintf(buffer, "\nZoomed Video\n"); - snd_iprintf(buffer, "Rate Locked : %s\n", val & SRCS_RATELOCKED ? "on" : "off"); + snd_iprintf(buffer, "Rate Locked : %s\n", str_on_off(val & SRCS_RATELOCKED)); snd_iprintf(buffer, "Estimated Sample Rate : 0x%x\n", val & SRCS_ESTSAMPLERATE); #endif } From patchwork Tue Jan 7 15:56:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 13929229 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58DF71F1928 for ; Tue, 7 Jan 2025 15:56:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265420; cv=none; b=T4x82YEfDwYJLnEfI6y6G8X+FWxi964vY/e749bUgoZoqGgTsDA/UIwVHLOTHn+LH7/MJuhpPhv/jZZj4IN96+oLzP7GmfRbSogA7sT+eC9eWYdn8cPqVdoFJrpkT8w8x12rskPkdc/4PPjoTzOSyQ/c9RMZhS4tBHqsN/dkfuE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265420; c=relaxed/simple; bh=jtr5x5mHQBUnE1YPyLTFXDzvPeBUKSE8DCCtIAlIU0s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bPb8Pf3slp7ZcpISD4KbNczI8XEp8WH5+8cqm+61DPmLg7Har7vuyxJ8yW8CU9SpdFWJmhQEBve1nArLyM3IVLwgNOZL/LyNFGRwRYwX0zuFvCL8gbL7UDl3Zd44XGLpwyyc1x1llp2jpmVBgUzYV+HS6kNbsR1ifB+/KB3Sw9c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=fDUp+vxE; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=DvzbXLy6; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=fDUp+vxE; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=DvzbXLy6; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="fDUp+vxE"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="DvzbXLy6"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="fDUp+vxE"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="DvzbXLy6" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 77A112115A; Tue, 7 Jan 2025 15:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dg4/RrX4UFo/8m+8Uci8EOr9RT5Rc5Hm8aFblJGGfMk=; b=fDUp+vxE6wJ+k2KFSBmFK5zVXpBuTYl41oc+ZVPVSMna71QD5q6hV7X4Az27lOLt06jB0D yezvo3789WpCMYlyd5vb1FzFDXUsNQemz4dBDqHTKdIos/lGGrc9C2LiM8vtlMzABN2Q53 VesF8ooh94JsIS4ES6dEZRz8xPyVgt8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dg4/RrX4UFo/8m+8Uci8EOr9RT5Rc5Hm8aFblJGGfMk=; b=DvzbXLy6NqELfxoEPsJHAkt3RqOPNp4fATm9tnaPRNgllLdN7cVzLNgXN/2OXcGc7TwqIh ObwTJ08k9mArsyDw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=fDUp+vxE; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=DvzbXLy6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dg4/RrX4UFo/8m+8Uci8EOr9RT5Rc5Hm8aFblJGGfMk=; b=fDUp+vxE6wJ+k2KFSBmFK5zVXpBuTYl41oc+ZVPVSMna71QD5q6hV7X4Az27lOLt06jB0D yezvo3789WpCMYlyd5vb1FzFDXUsNQemz4dBDqHTKdIos/lGGrc9C2LiM8vtlMzABN2Q53 VesF8ooh94JsIS4ES6dEZRz8xPyVgt8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dg4/RrX4UFo/8m+8Uci8EOr9RT5Rc5Hm8aFblJGGfMk=; b=DvzbXLy6NqELfxoEPsJHAkt3RqOPNp4fATm9tnaPRNgllLdN7cVzLNgXN/2OXcGc7TwqIh ObwTJ08k9mArsyDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 56DDE13A9E; Tue, 7 Jan 2025 15:56:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id oHvzE8dOfWfNUwAAD6G6ig (envelope-from ); Tue, 07 Jan 2025 15:56:55 +0000 From: Takashi Iwai To: linux-sound@vger.kernel.org Cc: Takashi Sakamoto Subject: [PATCH 5/7] ALSA: firewire: Simplify with str_on_off() Date: Tue, 7 Jan 2025 16:56:35 +0100 Message-ID: <20250107155641.4435-6-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250107155641.4435-1-tiwai@suse.de> References: <20250107155641.4435-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 77A112115A X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:25478, ipnet:::/0, country:RU]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the standard helper str_on_off() to simplify the code. Only code refactoring, no behavior change. Cc: Takashi Sakamoto Signed-off-by: Takashi Iwai Reviewed-by: Takashi Sakamoto --- sound/firewire/fireface/ff-protocol-former.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/firewire/fireface/ff-protocol-former.c b/sound/firewire/fireface/ff-protocol-former.c index efd59e9d9935..0907d0a2296f 100644 --- a/sound/firewire/fireface/ff-protocol-former.c +++ b/sound/firewire/fireface/ff-protocol-former.c @@ -135,13 +135,13 @@ static void dump_clock_config(struct snd_ff *ff, struct snd_info_buffer *buffer) snd_iprintf(buffer, "Output S/PDIF format: %s (Emphasis: %s)\n", (data & 0x00000020) ? "Professional" : "Consumer", - (data & 0x00000040) ? "on" : "off"); + str_on_off(data & 0x00000040)); snd_iprintf(buffer, "Optical output interface format: %s\n", (data & 0x00000100) ? "S/PDIF" : "ADAT"); snd_iprintf(buffer, "Word output single speed: %s\n", - (data & 0x00002000) ? "on" : "off"); + str_on_off(data & 0x00002000)); snd_iprintf(buffer, "S/PDIF input interface: %s\n", (data & 0x00000200) ? "Optical" : "Coaxial"); From patchwork Tue Jan 7 15:56:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 13929232 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 57C401F131C for ; Tue, 7 Jan 2025 15:56:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265420; cv=none; b=fqpFEtyXFXzX7B9tA2c3DGBybIjli6Sylhyw0WfdGrLs6vrZLKyWAxZoVU3pPI3F5OfDu6kfG5yNrxoIG7cQZVqY6F8fvLN9wGnhJepZZ4E3mTqpVEQbM73wFwHrDCu4qk4x8e3EA8VtHG/6zX7aKlYxbrhoi0so4efoc9YBspo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265420; c=relaxed/simple; bh=yCfESsXSZM1VgIRsqTEaF6jFI2fAhlD5jflz2hXXFoU=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sh5uNFOdy7sBV3gPiBBMubv8410gbHvBdPM/Dxqth4dTJz9jjP+g9nXJSUDUgWFLHbXAOswwne3GPiwBpAKymoxwBmkN2j5eQ/HrHQo35Z7ZLUx64qpxlnnAKLh52slWDU3VD5JeE3feXoKQS0Z3azmPm+jHXcd/r5A9pvAgkLo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=y7oNGytB; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=JcZqd17/; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=y7oNGytB; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=JcZqd17/; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="y7oNGytB"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="JcZqd17/"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="y7oNGytB"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="JcZqd17/" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 97F771F390; Tue, 7 Jan 2025 15:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jk4ZvhLgACBLnZU6knZnBpFftV27uPNst31N69gUf5Y=; b=y7oNGytB9oTcf6ZMLofOV0AEt53Mk8aisIQmjUJu9Ck/5IiwRIPX6jdctmW45NmyutPg3S V5PiW+zI+EouXrC8H7MobUC9ob8yCv4I8e2Bs13hax7hrFKjrDhlxAnVKGqmRH13jf65IG WTSCl+ksncpSn/a9C7Uij68mHFVLnkI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jk4ZvhLgACBLnZU6knZnBpFftV27uPNst31N69gUf5Y=; b=JcZqd17/M59CX970hqemabqjLkYTTArp0WnecPDGOWg+jHD7uudweB/60jNhbdUoapttCg Mi0ddxz1UbSA4MAQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=y7oNGytB; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="JcZqd17/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jk4ZvhLgACBLnZU6knZnBpFftV27uPNst31N69gUf5Y=; b=y7oNGytB9oTcf6ZMLofOV0AEt53Mk8aisIQmjUJu9Ck/5IiwRIPX6jdctmW45NmyutPg3S V5PiW+zI+EouXrC8H7MobUC9ob8yCv4I8e2Bs13hax7hrFKjrDhlxAnVKGqmRH13jf65IG WTSCl+ksncpSn/a9C7Uij68mHFVLnkI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jk4ZvhLgACBLnZU6knZnBpFftV27uPNst31N69gUf5Y=; b=JcZqd17/M59CX970hqemabqjLkYTTArp0WnecPDGOWg+jHD7uudweB/60jNhbdUoapttCg Mi0ddxz1UbSA4MAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7DAAF13A6A; Tue, 7 Jan 2025 15:56:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id sGRuHcdOfWfNUwAAD6G6ig (envelope-from ); Tue, 07 Jan 2025 15:56:55 +0000 From: Takashi Iwai To: linux-sound@vger.kernel.org Subject: [PATCH 6/7] ALSA: seq: oss: Simplify with str_enabled_disabled() Date: Tue, 7 Jan 2025 16:56:36 +0100 Message-ID: <20250107155641.4435-7-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250107155641.4435-1-tiwai@suse.de> References: <20250107155641.4435-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 97F771F390 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:25478, ipnet:::/0, country:RU]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_ONE(0.00)[1]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the standard helper str_enabled_disabled() to simplify the code. Only code refactoring, no behavior change. Signed-off-by: Takashi Iwai --- sound/core/seq/oss/seq_oss_device.h | 4 ---- sound/core/seq/oss/seq_oss_init.c | 6 ------ sound/core/seq/oss/seq_oss_synth.c | 4 ++-- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/sound/core/seq/oss/seq_oss_device.h b/sound/core/seq/oss/seq_oss_device.h index c0b1cce127a3..6163a00bc8de 100644 --- a/sound/core/seq/oss/seq_oss_device.h +++ b/sound/core/seq/oss/seq_oss_device.h @@ -156,8 +156,4 @@ snd_seq_oss_fill_addr(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, ev->dest.port = dest_port; } - -/* misc. functions for proc interface */ -char *enabled_str(bool b); - #endif /* __SEQ_OSS_DEVICE_H */ diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c index e0733efba027..e6d7d83ed0e7 100644 --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c @@ -449,12 +449,6 @@ snd_seq_oss_reset(struct seq_oss_devinfo *dp) /* * misc. functions for proc interface */ -char * -enabled_str(bool b) -{ - return b ? "enabled" : "disabled"; -} - static const char * filemode_str(int val) { diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c index 02a90c960992..9de47e098b29 100644 --- a/sound/core/seq/oss/seq_oss_synth.c +++ b/sound/core/seq/oss/seq_oss_synth.c @@ -608,8 +608,8 @@ snd_seq_oss_synth_info_read(struct snd_info_buffer *buf) rec->synth_type, rec->synth_subtype, rec->nr_voices); snd_iprintf(buf, " capabilities : ioctl %s / load_patch %s\n", - enabled_str((long)rec->oper.ioctl), - enabled_str((long)rec->oper.load_patch)); + str_enabled_disabled((long)rec->oper.ioctl), + str_enabled_disabled((long)rec->oper.load_patch)); snd_use_lock_free(&rec->use_lock); } } From patchwork Tue Jan 7 15:56:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 13929234 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F5FE1F2364 for ; Tue, 7 Jan 2025 15:56:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265421; cv=none; b=WlobZQuH0pYaAtsVQwDf+B80zj4/h3fF+52AGdNWa/BtWR5bUH6II4I5R5sLynf+ggzjBXemRiDfEvjBIuaKP7MvU8FNs14dSibLp38fQghUcJjBKxdBRULO/aasqnvvLB9hkn9ceN3xvEza/hxK/olavTYEyzdOfH10g3pYNsQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736265421; c=relaxed/simple; bh=QTOtapvsp32s+ErFPTdNYa3XyclWmieLrzmnzlJ/5bo=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G0v/awZaEs8GpzZLMkB+1mpXJSy/uGmtNT5Y1lLQ0hNhwf0Ud6cA9QVGkM5DpZMairR5ttBOXf7LdIS0AEbU76sa5+/XlnL4a9iv/oY+Vf1cpAkG2N7RGhq8d1FQaZIgDcK1X15oecuRJ1QDCjMd6QEQDJ9RteuLc5oz3Xp3XsA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=uAnYXOM1; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=JNsKTRyj; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=uAnYXOM1; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=JNsKTRyj; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="uAnYXOM1"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="JNsKTRyj"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="uAnYXOM1"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="JNsKTRyj" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B716E1F450; Tue, 7 Jan 2025 15:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bw6XsbKe8twXts7p6O+kQeH7v9MRfVSPAgMQRdmsFCM=; b=uAnYXOM1NnP3WQi9JOIeLbJHhuAnLEotErxSNNP2gEuo7raO2pXAqPZ3RxCb5emq8mC54p I7P9tdPC/OnaRy4gYF40nRKFmtCMyaEzZf9fboTpQk9dfD08ptRU+SjHSz2eJ7LT4mnnks tmgU4kCwiAauismfj9pqFpIH1ZUVhOo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bw6XsbKe8twXts7p6O+kQeH7v9MRfVSPAgMQRdmsFCM=; b=JNsKTRyjQkYhu+5vXyE+70xhTFP4LllyeeGTCdxQ4eOpuj2r653fYR792AWIdPPwplnF+/ PBTBHWRoEFDLKTDQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bw6XsbKe8twXts7p6O+kQeH7v9MRfVSPAgMQRdmsFCM=; b=uAnYXOM1NnP3WQi9JOIeLbJHhuAnLEotErxSNNP2gEuo7raO2pXAqPZ3RxCb5emq8mC54p I7P9tdPC/OnaRy4gYF40nRKFmtCMyaEzZf9fboTpQk9dfD08ptRU+SjHSz2eJ7LT4mnnks tmgU4kCwiAauismfj9pqFpIH1ZUVhOo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1736265415; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bw6XsbKe8twXts7p6O+kQeH7v9MRfVSPAgMQRdmsFCM=; b=JNsKTRyjQkYhu+5vXyE+70xhTFP4LllyeeGTCdxQ4eOpuj2r653fYR792AWIdPPwplnF+/ PBTBHWRoEFDLKTDQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9D25913AA7; Tue, 7 Jan 2025 15:56:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 0GcMJcdOfWfNUwAAD6G6ig (envelope-from ); Tue, 07 Jan 2025 15:56:55 +0000 From: Takashi Iwai To: linux-sound@vger.kernel.org Subject: [PATCH 7/7] ALSA: hda: Simplify with str_enable_disable() Date: Tue, 7 Jan 2025 16:56:37 +0100 Message-ID: <20250107155641.4435-8-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250107155641.4435-1-tiwai@suse.de> References: <20250107155641.4435-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the standard helper str_enable_disable() to simplify the code. Only code refactoring, no behavior change. Signed-off-by: Takashi Iwai --- sound/hda/hdac_component.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/hda/hdac_component.c b/sound/hda/hdac_component.c index bb37e7e0bd79..9c82a2864a2f 100644 --- a/sound/hda/hdac_component.c +++ b/sound/hda/hdac_component.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -42,8 +43,7 @@ int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable) if (!acomp->ops->codec_wake_override) return 0; - dev_dbg(bus->dev, "%s codec wakeup\n", - enable ? "enable" : "disable"); + dev_dbg(bus->dev, "%s codec wakeup\n", str_enable_disable(enable)); acomp->ops->codec_wake_override(acomp->dev, enable); @@ -67,8 +67,7 @@ void snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx, bool enable) { struct drm_audio_component *acomp = bus->audio_component; - dev_dbg(bus->dev, "display power %s\n", - enable ? "enable" : "disable"); + dev_dbg(bus->dev, "display power %s\n", str_enable_disable(enable)); mutex_lock(&bus->lock); if (enable)