Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2580875iog; Sun, 26 Jun 2022 20:52:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vRzVyEKEqWm2mcrRArBg83yVJsbK7/bnOmlrB7I6Oy/basNNRgAfeSUWBzUVj2jZy2+KRZ X-Received: by 2002:a05:6402:354d:b0:435:93f9:fc0b with SMTP id f13-20020a056402354d00b0043593f9fc0bmr13863230edd.288.1656301956431; Sun, 26 Jun 2022 20:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656301956; cv=none; d=google.com; s=arc-20160816; b=woM+jNP/wBYm3umHH8dHFSjWc3G2h6lb5sOW3XcSpBxi8X97dlSiS6jYF+ulD2GOA8 waeC3agrOiJFQJ7Gmz5tnYgm3O8/A4+md7K85O3aECR0EesBY/Ek1j0wVLDTFATgVbLE +nm2ZiQCPgzl3Z65ae3HvLKJS4xUw+VIeX+npGgv5+jJiOpmXQ75pQGZ19iQihMXyf2o 3A6Vm9mmopK6tqCzORwKfvZNId5iDuq+mJnsRFvLpFXIG018TxQc9QmfwA+XoQ3V4xGu yAwD5laqlgfn2iGemq4JQpq9ur/AJaoZxPSixiG1f9OWF3qwgPSmVvmTuL1Mp3gAweds ICeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=9HGrSD1Nmubl8YToXsWe+C1xleIkoEBb1wplNGkwNVI=; b=OK2c3tJvOeCqLEoABFMfqVQi7HFcfXaerVyhh6ErIB6kwfQDLb3x/WWToaWNrx3iXj tjze+fE0Ia07kL+gKYAxR662QDtd5AZgVxU+Sn4vN1N46+uEfGvUQgu/vcELN6gBRRdZ kq9rB1aePLyEr67bKSKvz5LdiL0qjjcqsuLZXRKbU2MTWLJZjlm+XqUFqhKyRjXQ0P7X aNjiKJgOkQf/uVdxpb738o8Ah19Ypvc75UTMrD7LC7MkwwcRSBjl9V/XS1mlsAWBh7Gu 2QGEytimezrGkOPPWFOE9xatuO8KpwGHXSTS2uhfc5vqvTkxMDKF8h6R4TJJ2tVmeq69 /gTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020a50c356000000b004358dfbaacbsi11131336edb.405.2022.06.26.20.52.12; Sun, 26 Jun 2022 20:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232608AbiF0DZt (ORCPT + 99 others); Sun, 26 Jun 2022 23:25:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232616AbiF0DZj (ORCPT ); Sun, 26 Jun 2022 23:25:39 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 63EFF272C for ; Sun, 26 Jun 2022 20:25:29 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 34A691E80D11; Mon, 27 Jun 2022 11:24:37 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1vS-1UF097dy; Mon, 27 Jun 2022 11:24:34 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: kunyu@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 65D031E80D5E; Mon, 27 Jun 2022 11:24:34 +0800 (CST) From: Li kunyu To: perex@perex.cz, tiwai@suse.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] sound: It seems that the code format could be cleaner Date: Mon, 27 Jun 2022 11:25:21 +0800 Message-Id: <20220627032521.259750-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It seems that the condition statement and return statement could be tidied up by adding blank lines. Signed-off-by: Li kunyu --- sound/pci/emu10k1/p16v.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c index 18a1b0740e6b..d594c874f61a 100644 --- a/sound/pci/emu10k1/p16v.c +++ b/sound/pci/emu10k1/p16v.c @@ -510,7 +510,9 @@ snd_p16v_pcm_pointer_playback(struct snd_pcm_substream *substream) ptr3 = snd_emu10k1_ptr20_read(emu, PLAYBACK_LIST_PTR, channel); ptr1 = snd_emu10k1_ptr20_read(emu, PLAYBACK_POINTER, channel); ptr4 = snd_emu10k1_ptr20_read(emu, PLAYBACK_LIST_PTR, channel); - if (ptr3 != ptr4) ptr1 = snd_emu10k1_ptr20_read(emu, PLAYBACK_POINTER, channel); + if (ptr3 != ptr4) + ptr1 = snd_emu10k1_ptr20_read(emu, PLAYBACK_POINTER, channel); + ptr2 = bytes_to_frames(runtime, ptr1); ptr2+= (ptr4 >> 3) * runtime->period_size; ptr=ptr2; @@ -703,9 +705,10 @@ static int snd_p16v_capture_source_put(struct snd_kcontrol *kcontrol, u32 mask; u32 source; - val = ucontrol->value.enumerated.item[0] ; + val = ucontrol->value.enumerated.item[0]; if (val > 7) return -EINVAL; + change = (emu->p16v_capture_source != val); if (change) { emu->p16v_capture_source = val; @@ -741,9 +744,10 @@ static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol, int change = 0; u32 tmp; - val = ucontrol->value.enumerated.item[0] ; + val = ucontrol->value.enumerated.item[0]; if (val > 3) return -EINVAL; + change = (emu->p16v_capture_channel != val); if (change) { emu->p16v_capture_channel = val; @@ -813,6 +817,7 @@ int snd_p16v_alloc_pm_buffer(struct snd_emu10k1 *emu) emu->p16v_saved = vmalloc(array_size(NUM_CHS * 4, 0x80)); if (! emu->p16v_saved) return -ENOMEM; + return 0; } -- 2.18.2