From patchwork Wed Sep 19 21:47:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Simonov X-Patchwork-Id: 10607091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EBDCF5A4 for ; Thu, 20 Sep 2018 07:01:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9FE62D26B for ; Thu, 20 Sep 2018 07:01:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D85F82D281; Thu, 20 Sep 2018 07:01:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7587B2D28C for ; Thu, 20 Sep 2018 07:01:19 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 76380267889; Thu, 20 Sep 2018 09:00:34 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 12BE926788E; Wed, 19 Sep 2018 23:47:32 +0200 (CEST) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by alsa0.perex.cz (Postfix) with ESMTP id 3333B267889 for ; Wed, 19 Sep 2018 23:47:29 +0200 (CEST) Received: by mail-lj1-f196.google.com with SMTP id x16-v6so27065ljd.12 for ; Wed, 19 Sep 2018 14:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=0pnysa9LYWXiv/lmq/UpOIIIkfxL8NfCriv/Ioaklc0=; b=c2+YqoEv2NoW0MgpTxXS5N3bFIZCFhN8ys3y/wx0vGGOJywa9+hfi2ZNQPwpQCFqQV 4SumWkL505nlnZGsD7K+LpsvaXqrPrpGDtAUW1kXmd3aidCusws6iYHdyFLvU9sL4fPB pPftct4RyJjgnwjVNSM2sehvFB/r5hpnKnnXljA8Pm02nKD8MI4ZX3DmulGLLnDKcNLL go7edukPDOfH7CGbkiQZ4y3+hU2+KoFDiwxTR/SA8o9iqBaTgdtts9KzLvFLZmxyieod 0ksU/s1ROajZrIJjHqo1L0FNixA9n4xlBiryqWZL++TFe8y92yRHkVITL1e7WZNsHME0 vBfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=0pnysa9LYWXiv/lmq/UpOIIIkfxL8NfCriv/Ioaklc0=; b=ug5LM69dDsOOaeW9ekkJMZ30RX8ggfmgewLZ6vlpngQZse5dFAYLTz0Kq9dlrzzQ+b TY3k4ARLRfHWAOSAg38/TpZ4HmcoYaWg5SUyUrVmDmHd7fpwd2OHbhBrCpXVEPnkTIlw lChir7eRC8PX/RVf32qGPkMxrcUK+AsZmH2Skp0hNUGOyORu8qiXRoCxMxmRM6NrYY6t MHJLyq0YEeUjM4DDQRvHNAQRTk9yjeJKYXCh6/GE2DYZCQo2ZXK1T+FOqQcKiDmeKLx5 SOCZR3WyKLWa7mxdaREYFp97IcxgGUTh6AmzDSWDZMyW4UqFkyt+N3rMtglqnBLJsxPJ xSHA== X-Gm-Message-State: APzg51CkSB5KJWdlgxk5ez9+IObO2maT8hARxlIy9w4huj1a78fig0/1 q7wVegEudcE5f96ByaEQgCE= X-Google-Smtp-Source: ANB0VdZxhwN9IT4vL+78jMm07s9Tg5URZtSWydG2lvzRDgOXweyeTeuHYlBzVmPMPfkuz6eDxWzeGQ== X-Received: by 2002:a2e:144c:: with SMTP id 12-v6mr24528775lju.122.1537393649159; Wed, 19 Sep 2018 14:47:29 -0700 (PDT) Received: from nick (retailing-exile.volia.net. [93.72.35.76]) by smtp.gmail.com with ESMTPSA id f66-v6sm4234390lji.23.2018.09.19.14.47.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Sep 2018 14:47:28 -0700 (PDT) Date: Thu, 20 Sep 2018 00:47:10 +0300 From: Nick Simonov To: oleksandr_andrushchenko@epam.com Message-ID: <20180919214710.GA6907@nick> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailman-Approved-At: Thu, 20 Sep 2018 09:00:29 +0200 Cc: xen-devel@lists.xenproject.org, alsa-devel@alsa-project.org, nicksimonovv@gmail.com, tiwai@suse.com, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ALSA: xen-front: Refine indentations and constify snd_pcm_ops X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP snd_pcm_ops are not supposed to change. So mark the non-const structs as const. Also, refine indentation to ncrease readability. Signed-off-by: Nick Simonov --- sound/xen/xen_snd_front_alsa.c | 46 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/sound/xen/xen_snd_front_alsa.c b/sound/xen/xen_snd_front_alsa.c index 129180e..2cbd967 100644 --- a/sound/xen/xen_snd_front_alsa.c +++ b/sound/xen/xen_snd_front_alsa.c @@ -637,31 +637,31 @@ static int alsa_pb_fill_silence(struct snd_pcm_substream *substream, * to know when the buffer can be transferred to the backend. */ -static struct snd_pcm_ops snd_drv_alsa_playback_ops = { - .open = alsa_open, - .close = alsa_close, - .ioctl = snd_pcm_lib_ioctl, - .hw_params = alsa_hw_params, - .hw_free = alsa_hw_free, - .prepare = alsa_prepare, - .trigger = alsa_trigger, - .pointer = alsa_pointer, - .copy_user = alsa_pb_copy_user, - .copy_kernel = alsa_pb_copy_kernel, - .fill_silence = alsa_pb_fill_silence, +static const struct snd_pcm_ops snd_drv_alsa_playback_ops = { + .open = alsa_open, + .close = alsa_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = alsa_hw_params, + .hw_free = alsa_hw_free, + .prepare = alsa_prepare, + .trigger = alsa_trigger, + .pointer = alsa_pointer, + .copy_user = alsa_pb_copy_user, + .copy_kernel = alsa_pb_copy_kernel, + .fill_silence = alsa_pb_fill_silence, }; -static struct snd_pcm_ops snd_drv_alsa_capture_ops = { - .open = alsa_open, - .close = alsa_close, - .ioctl = snd_pcm_lib_ioctl, - .hw_params = alsa_hw_params, - .hw_free = alsa_hw_free, - .prepare = alsa_prepare, - .trigger = alsa_trigger, - .pointer = alsa_pointer, - .copy_user = alsa_cap_copy_user, - .copy_kernel = alsa_cap_copy_kernel, +static const struct snd_pcm_ops snd_drv_alsa_capture_ops = { + .open = alsa_open, + .close = alsa_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = alsa_hw_params, + .hw_free = alsa_hw_free, + .prepare = alsa_prepare, + .trigger = alsa_trigger, + .pointer = alsa_pointer, + .copy_user = alsa_cap_copy_user, + .copy_kernel = alsa_cap_copy_kernel, }; static int new_pcm_instance(struct xen_snd_front_card_info *card_info,