From patchwork Fri Oct 20 23:23:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bergh X-Patchwork-Id: 736501 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44107C0032E for ; Fri, 20 Oct 2023 23:23:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbjJTXXw (ORCPT ); Fri, 20 Oct 2023 19:23:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbjJTXXs (ORCPT ); Fri, 20 Oct 2023 19:23:48 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0BF6D46; Fri, 20 Oct 2023 16:23:46 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2c503dbe50dso21781421fa.1; Fri, 20 Oct 2023 16:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697844225; x=1698449025; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ft8poZSombuD4W/Ja+9zHJlVT1MrHG6UJN71XEmxhrs=; b=bBmlnhePTWKOqHxKHFkqswkGtkHHFHObZkemZNO3jrxJN854MZcjm0zfKw8778GZkl pe607PeV3fe/QWzbiTCadyeVmAd1vXa5cDNA9vj1nX1Tq0TfObpcrE0lb4jOVLMdE+5y lmAIThfUGRLitH22EslSncY3IsvnIyl1QXU8GTQSOcvZ6j7pbDgW3KGVYxYHPYKz9Cph GtX6o+IK+CYtIIjm7qea8W/ZvS2sjlw7BeDhx0C0x+UycHZktlUW0iQaot5SqQEZMU6F fT2I/qHaNS0bSJ4w0Kev6yMBZckI38o8W9d2GtdWZ1UorN1LNFbJLjAQHRpiER5G+jqf ajmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697844225; x=1698449025; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ft8poZSombuD4W/Ja+9zHJlVT1MrHG6UJN71XEmxhrs=; b=DlgFwCRSluY91mHst/k43EVS9SS/1QybHHmLnbCB9v4OvOu4/Quj5IaP0EfCuOX4fz SukJhSEEtkt1qRs6UfNk6SbdX44hQNMDvMirey6RZePpJ2s7HSgL/N5SlqCYu2Afv1w9 UJfNRVLt3G5oEHb5W4qngN/+VDbyeKWBIh9K80l6ewb9eYUR3BdO71WEpC38wgXOopMy g2wgGD5gYIKgBusI8l1/dZf7+Fds/D3jrGeOY+bo3rn99zx7ZhCjzCk8E1HXpUqQkYB9 S6ptm0XDIdnREKSFr3XqGM1KUzjB5FakVT1ecJ4j0uC9tlOu1pY0U3/ChgZMUGTBJe4U C5Xg== X-Gm-Message-State: AOJu0YwoIcGL7A7osjoRa/urRAnxlWuWT5nELVsDUtWf8Dc235rjXMJT xZtj+pXsvsclfKNpRFnrEqY= X-Google-Smtp-Source: AGHT+IH3qhg33gZLIJj1HkTZAlvQpIvBJf657LfTvsB7Eih1QmyOl5q1EkeSK6qH/+SGsoS0kavmCw== X-Received: by 2002:a2e:a7c7:0:b0:2c5:1867:b0bd with SMTP id x7-20020a2ea7c7000000b002c51867b0bdmr1018904ljp.23.1697844224768; Fri, 20 Oct 2023 16:23:44 -0700 (PDT) Received: from HP-ENVY-Notebook.lan (81-229-94-10-no68.tbcn.telia.com. [81.229.94.10]) by smtp.googlemail.com with ESMTPSA id s5-20020a05651c048500b002ba586d27a2sm567571ljc.26.2023.10.20.16.23.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 16:23:44 -0700 (PDT) From: Jonathan Bergh To: mchehab@kernel.org Cc: gregkh@linuxfoundation.org, error27@gmail.com, linux-staging@lists.linux.dev, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Bergh Subject: [PATCH 1/5] staging: media: av7110: Fix missing newlines after declaration warnings Date: Sat, 21 Oct 2023 01:23:28 +0200 Message-Id: <20231020232332.55024-2-bergh.jonathan@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231020232332.55024-1-bergh.jonathan@gmail.com> References: <20231020232332.55024-1-bergh.jonathan@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixed the following formatting problem: * Missing newlines after declarations Signed-off-by: Jonathan Bergh --- drivers/staging/media/av7110/av7110_av.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/staging/media/av7110/av7110_av.c b/drivers/staging/media/av7110/av7110_av.c index 00dd6a7fea64..af3845406626 100644 --- a/drivers/staging/media/av7110/av7110_av.c +++ b/drivers/staging/media/av7110/av7110_av.c @@ -149,6 +149,7 @@ int av7110_av_start_record(struct av7110 *av7110, int av, int av7110_av_start_play(struct av7110 *av7110, int av) { int ret = 0; + dprintk(2, "av7110:%p, \n", av7110); if (av7110->rec_mode) @@ -183,6 +184,7 @@ int av7110_av_start_play(struct av7110 *av7110, int av) int av7110_av_stop(struct av7110 *av7110, int av) { int ret = 0; + dprintk(2, "av7110:%p, \n", av7110); if (!(av7110->playing & av) && !(av7110->rec_mode & av)) @@ -320,6 +322,7 @@ int av7110_set_volume(struct av7110 *av7110, unsigned int volleft, int av7110_set_vidmode(struct av7110 *av7110, enum av7110_video_mode mode) { int ret; + dprintk(2, "av7110:%p, \n", av7110); ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, LoadVidCode, 1, mode); @@ -408,6 +411,7 @@ static inline long aux_ring_buffer_write(struct dvb_ringbuffer *rbuf, static void play_video_cb(u8 *buf, int count, void *priv) { struct av7110 *av7110 = (struct av7110 *) priv; + dprintk(2, "av7110:%p, \n", av7110); if ((buf[3] & 0xe0) == 0xe0) { @@ -420,6 +424,7 @@ static void play_video_cb(u8 *buf, int count, void *priv) static void play_audio_cb(u8 *buf, int count, void *priv) { struct av7110 *av7110 = (struct av7110 *) priv; + dprintk(2, "av7110:%p, \n", av7110); aux_ring_buffer_write(&av7110->aout, buf, count); @@ -471,6 +476,7 @@ static ssize_t dvb_play(struct av7110 *av7110, const char __user *buf, unsigned long count, int nonblock, int type) { unsigned long todo = count, n; + dprintk(2, "av7110:%p, \n", av7110); if (!av7110->kbuf[type]) @@ -504,6 +510,7 @@ static ssize_t dvb_play_kernel(struct av7110 *av7110, const u8 *buf, unsigned long count, int nonblock, int type) { unsigned long todo = count, n; + dprintk(2, "av7110:%p, \n", av7110); if (!av7110->kbuf[type]) @@ -534,6 +541,7 @@ static ssize_t dvb_aplay(struct av7110 *av7110, const char __user *buf, unsigned long count, int nonblock, int type) { unsigned long todo = count, n; + dprintk(2, "av7110:%p, \n", av7110); if (!av7110->kbuf[type]) @@ -1039,6 +1047,7 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len /* search in buf for instances of 00 00 01 b5 1? */ for (i = 0; i < len; i++) { unsigned char c; + if (get_user(c, buf + i)) return -EFAULT; if (match == 5) { @@ -1223,6 +1232,7 @@ static int dvb_video_ioctl(struct file *file, case VIDEO_SET_DISPLAY_FORMAT: { video_displayformat_t format = (video_displayformat_t) arg; + switch (format) { case VIDEO_PAN_SCAN: av7110->display_panscan = VID_PAN_SCAN_PREF; @@ -1483,6 +1493,7 @@ static int dvb_audio_ioctl(struct file *file, case AUDIO_SET_MIXER: { struct audio_mixer *amix = (struct audio_mixer *)parg; + ret = av7110_set_volume(av7110, amix->volume_left, amix->volume_right); break; } From patchwork Fri Oct 20 23:23:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bergh X-Patchwork-Id: 736500 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5F5EC004C0 for ; Fri, 20 Oct 2023 23:23:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232068AbjJTXX5 (ORCPT ); Fri, 20 Oct 2023 19:23:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230372AbjJTXXw (ORCPT ); Fri, 20 Oct 2023 19:23:52 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29013D69; Fri, 20 Oct 2023 16:23:50 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2c50d1b9f22so18906361fa.0; Fri, 20 Oct 2023 16:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697844228; x=1698449028; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2xhWAgGK0TG28Y9dbvSoZSMOb85wa6hi070VtZ0aDXM=; b=WsxuE0TSh0Boeex3OAwIiqC8IZdl2bRmNY7g/T4V7oG49wNXKuxOdRtE/iQ/TR0w6g R7BLzAgQYUugEiGiKBLeaG8e0ozTj6Sy7f91ZI9VS3Ge8EuMXmY800AjbT2UssQFtW2d EBSDR2NpGgQ9keRfTJjr7VgucJ4NtaSS+CPOYvnyJLrnBPALc2rEowg0u/W77YMORSzB zOEUnBzkGNzU6JcuPad6dh79XQW6zXtqKnANPgpipLGiuP5xdbm14yuOKLHpAvJa9xyl 6Ixz7u+qcUZql0XTMZ/KVeGyYv5P1My+EIcnSLl8IvJStWdvrutkpIYe+dib6+L2JBC3 zQeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697844228; x=1698449028; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2xhWAgGK0TG28Y9dbvSoZSMOb85wa6hi070VtZ0aDXM=; b=GJFrJqLnER6PRsAAmtgnRyxwvL5oH2690SKcNFZnAhGR3L6H7I6mBdP729F/H3N55s VcB5YOSqzWHPKHm7m80isPAmlE65m4i2ZZrq+symhnCWaxZk/lF2AfuFg84/exzY0PEn 93Qqzrol0kLP32JPME8npqPQboVzqenoswuGpV0n4Ou2KGidgHJdPFTAkaMu7IDdmHAn XvRYGISKRMu2GFzaEuqzbhOGNvv45QCau9gIAcUQLVygRwz45FnSaALZHx+oQaUO6woB Z4JgWDbeuR6lCycE1XdRb9F9n73nsvKJJ4ZPoZwV6SgS32VI4nR2cbb3R+z/EdifkO95 +n0g== X-Gm-Message-State: AOJu0YxcfRxu5HwANXJNGdN3p/Q/OaXLp8J/okH5Lo6EqDRu2F2/qxo1 eGe0xdQ3m70zQsmybW5CYNg= X-Google-Smtp-Source: AGHT+IHrjAeBhMYFWXCuO9SFqEudVERTl67HkWwFQZR6Ixb+Eu6iGapsOJfS46ZJQHfoT7mKR9xDig== X-Received: by 2002:a2e:7c15:0:b0:2c5:5926:de52 with SMTP id x21-20020a2e7c15000000b002c55926de52mr2231584ljc.53.1697844228180; Fri, 20 Oct 2023 16:23:48 -0700 (PDT) Received: from HP-ENVY-Notebook.lan (81-229-94-10-no68.tbcn.telia.com. [81.229.94.10]) by smtp.googlemail.com with ESMTPSA id s5-20020a05651c048500b002ba586d27a2sm567571ljc.26.2023.10.20.16.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 16:23:47 -0700 (PDT) From: Jonathan Bergh To: mchehab@kernel.org Cc: gregkh@linuxfoundation.org, error27@gmail.com, linux-staging@lists.linux.dev, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Bergh Subject: [PATCH 3/5] staging: media: av7110: Remove unnecessary whitespace before quoted newlines Date: Sat, 21 Oct 2023 01:23:30 +0200 Message-Id: <20231020232332.55024-4-bergh.jonathan@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231020232332.55024-1-bergh.jonathan@gmail.com> References: <20231020232332.55024-1-bergh.jonathan@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixed multiple instances where whitespaces were placed before quoted newlines Signed-off-by: Jonathan Bergh --- drivers/staging/media/av7110/av7110_av.c | 40 ++++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/media/av7110/av7110_av.c b/drivers/staging/media/av7110/av7110_av.c index 482dfc548b16..880fa8a314ba 100644 --- a/drivers/staging/media/av7110/av7110_av.c +++ b/drivers/staging/media/av7110/av7110_av.c @@ -150,7 +150,7 @@ int av7110_av_start_play(struct av7110 *av7110, int av) { int ret = 0; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if (av7110->rec_mode) return -EBUSY; @@ -185,7 +185,7 @@ int av7110_av_stop(struct av7110 *av7110, int av) { int ret = 0; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if (!(av7110->playing & av) && !(av7110->rec_mode & av)) return 0; @@ -272,7 +272,7 @@ int av7110_set_volume(struct av7110 *av7110, unsigned int volleft, unsigned int vol, val, balance = 0; int err; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); av7110->mixer.volume_left = volleft; av7110->mixer.volume_right = volright; @@ -323,7 +323,7 @@ int av7110_set_vidmode(struct av7110 *av7110, enum av7110_video_mode mode) { int ret; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, LoadVidCode, 1, mode); @@ -358,7 +358,7 @@ static int get_video_format(struct av7110 *av7110, u8 *buf, int count) u8 *p; int ret = 0; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if (av7110->sinfo) return 0; @@ -412,7 +412,7 @@ static void play_video_cb(u8 *buf, int count, void *priv) { struct av7110 *av7110 = (struct av7110 *) priv; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if ((buf[3] & 0xe0) == 0xe0) { get_video_format(av7110, buf, count); @@ -425,7 +425,7 @@ static void play_audio_cb(u8 *buf, int count, void *priv) { struct av7110 *av7110 = (struct av7110 *) priv; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); aux_ring_buffer_write(&av7110->aout, buf, count); } @@ -477,7 +477,7 @@ static ssize_t dvb_play(struct av7110 *av7110, const char __user *buf, { unsigned long todo = count, n; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if (!av7110->kbuf[type]) return -ENOBUFS; @@ -511,7 +511,7 @@ static ssize_t dvb_play_kernel(struct av7110 *av7110, const u8 *buf, { unsigned long todo = count, n; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if (!av7110->kbuf[type]) return -ENOBUFS; @@ -542,7 +542,7 @@ static ssize_t dvb_aplay(struct av7110 *av7110, const char __user *buf, { unsigned long todo = count, n; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if (!av7110->kbuf[type]) return -ENOBUFS; @@ -847,7 +847,7 @@ int av7110_write_to_decoder(struct dvb_demux_feed *feed, const u8 *buf, size_t l struct dvb_demux *demux = feed->demux; struct av7110 *av7110 = demux->priv; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if (av7110->full_ts && demux->dmx.frontend->source != DMX_MEMORY_FE) return 0; @@ -937,7 +937,7 @@ static __poll_t dvb_video_poll(struct file *file, poll_table *wait) struct av7110 *av7110 = dvbdev->priv; __poll_t mask = 0; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if ((file->f_flags & O_ACCMODE) != O_RDONLY) poll_wait(file, &av7110->avout.queue, wait); @@ -967,7 +967,7 @@ static ssize_t dvb_video_write(struct file *file, const char __user *buf, struct av7110 *av7110 = dvbdev->priv; unsigned char c; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if ((file->f_flags & O_ACCMODE) == O_RDONLY) return -EPERM; @@ -989,7 +989,7 @@ static __poll_t dvb_audio_poll(struct file *file, poll_table *wait) struct av7110 *av7110 = dvbdev->priv; __poll_t mask = 0; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); poll_wait(file, &av7110->aout.queue, wait); @@ -1009,7 +1009,7 @@ static ssize_t dvb_audio_write(struct file *file, const char __user *buf, struct av7110 *av7110 = dvbdev->priv; unsigned char c; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if (av7110->audiostate.stream_source != AUDIO_SOURCE_MEMORY) { printk(KERN_ERR "not audio source memory\n"); @@ -1034,7 +1034,7 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len int progressive = 0; int match = 0; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if (len == 0) return 0; @@ -1516,7 +1516,7 @@ static int dvb_video_open(struct inode *inode, struct file *file) struct av7110 *av7110 = dvbdev->priv; int err; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if ((err = dvb_generic_open(inode, file)) < 0) return err; @@ -1540,7 +1540,7 @@ static int dvb_video_release(struct inode *inode, struct file *file) struct dvb_device *dvbdev = file->private_data; struct av7110 *av7110 = dvbdev->priv; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if ((file->f_flags & O_ACCMODE) != O_RDONLY) { av7110_av_stop(av7110, RP_VIDEO); @@ -1555,7 +1555,7 @@ static int dvb_audio_open(struct inode *inode, struct file *file) struct av7110 *av7110 = dvbdev->priv; int err = dvb_generic_open(inode, file); - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); if (err < 0) return err; @@ -1569,7 +1569,7 @@ static int dvb_audio_release(struct inode *inode, struct file *file) struct dvb_device *dvbdev = file->private_data; struct av7110 *av7110 = dvbdev->priv; - dprintk(2, "av7110:%p, \n", av7110); + dprintk(2, "av7110:%p,\n", av7110); av7110_av_stop(av7110, RP_AUDIO); return dvb_generic_release(inode, file); From patchwork Fri Oct 20 23:23:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bergh X-Patchwork-Id: 736499 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28D17C001DF for ; Fri, 20 Oct 2023 23:24:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232838AbjJTXYB (ORCPT ); Fri, 20 Oct 2023 19:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbjJTXX6 (ORCPT ); Fri, 20 Oct 2023 19:23:58 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9739AD7E; Fri, 20 Oct 2023 16:23:54 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2c51682fddeso27615921fa.1; Fri, 20 Oct 2023 16:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697844232; x=1698449032; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iGRsKfkSWDnEn2JQQ9Vic5ujLknS138ZJ2S7yseoneg=; b=hQ/J7CcxH1E1UUk2p4qRLSNMKrtasio11zaKJAIg+J40C+0s7OBDujpSGhAcSVYKpT xUzyEa2Ok6noZLZVycXzr+5L0Sn6eMPl0fPzu3cvrEpBVvo685almepc8Q6H5HJmoSWl IcUvu2tErjnhSvNhrb46OVBtDmjSNpanCoOjrkDIkjAhckLyiPXq2sF08/PJ8EYmvRPF v2QwJ9qdfNbsWQXR6djbZltuquuYvCjcvdlP2jjKjI1bZct2hv/3AmwYsYI2YXIVswBp HD2qlmBPGnINXKZ6De6nvAzDAbdB/G5eQ8oj+Ig97ZoKVgFiQmKUbWZEb1kF3goylwzD 2kSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697844232; x=1698449032; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iGRsKfkSWDnEn2JQQ9Vic5ujLknS138ZJ2S7yseoneg=; b=bC+fKBJaupM/aFbeipqBhoErohd5R1Q3bENcxHyitxbaeSQPCofBEcuGzBAfhF6daz ZKKB5yM7Z938pg1CPgWkuP1GpeG798fpyaEn4s/43CIgtZ31+Ay8dxcaZRDQ0WaAyF7j Sy77BfxNPGcPgsrA053mIqsWvxuWEQEJNbMutu5QiCJTYsfskXXgJ1iDey9/mZ8cf9jA D/4DQzJoGQJU7mc2sAjZHphPTp0cCLnqXvOuyXrYAiCW0IFmdfqkBDGmVuc+hfI5MqkW 3EeYTDyGN9uf0y6vFLrr8465JeZLu+oiE+T+I4s7S8oFe3HOCMbczDSLk/rkRAmPoNNb GitQ== X-Gm-Message-State: AOJu0YyxwUXjB6d/MLRe0BfFmeRypEVmZcHLrCQJ+fN3Er5dwls8OAHZ rNdZKwMlVkv6a6+Td1OAs9s= X-Google-Smtp-Source: AGHT+IFOfc56kvRMQKU4YI4wz+SHLZ4jJDaGRbsm2bxm03UdaXXNTuz7Unljg/pDXKD5leXRpPmG2w== X-Received: by 2002:a2e:9194:0:b0:2c0:a0d:1f0a with SMTP id f20-20020a2e9194000000b002c00a0d1f0amr2138271ljg.18.1697844232420; Fri, 20 Oct 2023 16:23:52 -0700 (PDT) Received: from HP-ENVY-Notebook.lan (81-229-94-10-no68.tbcn.telia.com. [81.229.94.10]) by smtp.googlemail.com with ESMTPSA id s5-20020a05651c048500b002ba586d27a2sm567571ljc.26.2023.10.20.16.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 16:23:52 -0700 (PDT) From: Jonathan Bergh To: mchehab@kernel.org Cc: gregkh@linuxfoundation.org, error27@gmail.com, linux-staging@lists.linux.dev, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Bergh Subject: [PATCH 5/5] staging: media: av7110: Fix various formating issues Date: Sat, 21 Oct 2023 01:23:32 +0200 Message-Id: <20231020232332.55024-6-bergh.jonathan@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231020232332.55024-1-bergh.jonathan@gmail.com> References: <20231020232332.55024-1-bergh.jonathan@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixed the following remaining formatting issues: * ensure balanced whitespaces around '&' symbol * fix irregular whitespacings in variable assignment statement * fix suspect identation after if statement * fix instances were trailing statements after case statements were not on a newline * fixed a block comment to use '*' on succesive lines * Remove unneeded braces {} for single line conditional statement Signed-off-by: Jonathan Bergh --- drivers/staging/media/av7110/av7110_av.c | 29 +++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/staging/media/av7110/av7110_av.c b/drivers/staging/media/av7110/av7110_av.c index 82d4c02ae3ef..bdef95244121 100644 --- a/drivers/staging/media/av7110/av7110_av.c +++ b/drivers/staging/media/av7110/av7110_av.c @@ -241,8 +241,8 @@ int av7110_pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen) sync |= DVB_RINGBUFFER_PEEK(buf, 2) << 8; sync |= DVB_RINGBUFFER_PEEK(buf, 3); - if (((sync &~0x0f) == 0x000001e0) || - ((sync &~0x1f) == 0x000001c0) || + if (((sync & ~0x0f) == 0x000001e0) || + ((sync & ~0x1f) == 0x000001c0) || (sync == 0x000001bd)) break; printk("resync\n"); @@ -297,10 +297,10 @@ int av7110_set_volume(struct av7110 *av7110, unsigned int volleft, return 0; case DVB_ADAC_MSP34x0: - vol = (volleft > volright) ? volleft : volright; - val = (vol * 0x73 / 255) << 8; + vol = (volleft > volright) ? volleft : volright; + val = (vol * 0x73 / 255) << 8; if (vol > 0) - balance = ((volright - volleft) * 127) / vol; + balance = ((volright - volleft) * 127) / vol; msp_writereg(av7110, MSP_WR_DSP, 0x0001, balance << 8); msp_writereg(av7110, MSP_WR_DSP, 0x0000, val); /* loudspeaker */ msp_writereg(av7110, MSP_WR_DSP, 0x0006, val); /* headphonesr */ @@ -367,8 +367,8 @@ static int get_video_format(struct av7110 *av7110, u8 *buf, int count) if (p[0] || p[1] || p[2] != 0x01 || p[3] != 0xb3) continue; p += 4; - hsize = ((p[1] &0xF0) >> 4) | (p[0] << 4); - vsize = ((p[1] &0x0F) << 8) | (p[2]); + hsize = ((p[1] & 0xF0) >> 4) | (p[0] << 4); + vsize = ((p[1] & 0x0F) << 8) | (p[2]); sw = (p[3] & 0x0F); ret = av7110_set_vidmode(av7110, sw2mode[sw]); if (!ret) { @@ -1059,13 +1059,16 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len continue; } switch (match++) { - case 2: if (c == 0x01) + case 2: + if (c == 0x01) continue; break; - case 3: if (c == 0xb5) + case 3: + if (c == 0xb5) continue; break; - case 4: if ((c & 0xf0) == 0x10) + case 4: + if ((c & 0xf0) == 0x10) continue; break; } @@ -1073,7 +1076,8 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len } /* setting n always > 1, fixes problems when playing stillframes - consisting of I- and P-Frames */ + * consisting of I- and P-Frames + */ n = MIN_IFRAME / len + 1; /* FIXME: nonblock? */ @@ -1542,9 +1546,8 @@ static int dvb_video_release(struct inode *inode, struct file *file) dprintk(2, "av7110:%p,\n", av7110); - if ((file->f_flags & O_ACCMODE) != O_RDONLY) { + if ((file->f_flags & O_ACCMODE) != O_RDONLY) av7110_av_stop(av7110, RP_VIDEO); - } return dvb_generic_release(inode, file); }