From patchwork Mon Feb 13 19:12:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhijit Naik X-Patchwork-Id: 9570703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2F55C60572 for ; Mon, 13 Feb 2017 19:16:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20EA327F4B for ; Mon, 13 Feb 2017 19:16:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15B6827F85; Mon, 13 Feb 2017 19:16:16 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8123C27F4B for ; Mon, 13 Feb 2017 19:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=EqzvwRsgRAjoJfPrJOCivz2T2KtDJhvXU8pxwBP2vHc=; b=t2KSGgdyyAeatiRQQuZPvrl2q4 EEGfg6SaJ/FnkBi7OjVFuG+0Ls9RSEh1Rgq0l9RPSPHBWLCHmSdzp3TpYEeA3nIXVrDWofNaJNRJR p+dzGWFieJ2SVrCGu2xDiaN5WNydK0siV+qk/kZCm2sZfoyXHwUbQLnSnV8870YdygbTk1ZCRQuqk jUswwyea1hfr85S8YELTWYMsAwU1j2/k9HPDSHBmrVZCUi0W7rWGoLPUHBmAPwMYN+oeldk7WRyt3 6gnbrJ+9qvl8v0R+4Iwg4kl2TdArITVjJXu4RsrJZQQe6JxWLzOmW7I47kWtOsz0qJpEp+VUSwKJx vio16eFg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cdM6b-0006Ui-1D; Mon, 13 Feb 2017 19:16:09 +0000 Received: from mail-ot0-x241.google.com ([2607:f8b0:4003:c0f::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cdM6N-0006Et-6n for linux-arm-kernel@lists.infradead.org; Mon, 13 Feb 2017 19:16:00 +0000 Received: by mail-ot0-x241.google.com with SMTP id f9so13093926otd.0 for ; Mon, 13 Feb 2017 11:15:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pLWfsvPk8pveBZrdwC/cVzC3ynOAIoGNCr/j/CpAlig=; b=pE0G3zWVV4DTG1oB1M+OZZkLMvUhxf8+5qfNl7/onVnyuX5fhibaABOTvmrOmRtKbn CbjCLe8VLcsy5R/sIZSGCDS5pTGPAGA4TcTlpFN18+041VATqYWLCmWBa0jYymvt/vEU jtSGLBv1uUeh28DX9f5NKoKC4NFtcT2RdqrfPPDI3Dsm1R8bFMitBQf8plPMzCqeWY+3 haAvNqz1uV/tqyp+kt/HKvCpl5r7SmqilRbJ3x4vIvn8sZV7xEGu/Y/5xMZU7CoU/C+B b8gPbEutG4oy54kT+RPE1uUhj5IfPwJkN/Ig1GBhi7DRa+0k2E3eQbiys9VCllCyzXGx 88Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pLWfsvPk8pveBZrdwC/cVzC3ynOAIoGNCr/j/CpAlig=; b=sy5gA7e012LghRt1Lopo2XJyEOIacHUNwF1zebfZ2rDS2/kglp9UBeYDB0cmsnPn/b RGX5Q85bP7fgnPBb7mljxggkgLahQ1F0xVOSPcAdqSFfsd3vuTqjGTfVK4mZYhmAQbK4 6ZLPMz6zNuKLKsf0Ad5qdkA9+KxipRvtBj/V4Wg1u1/vmzuVtrKx+lNqevRGrgUmIzkv aHtYCp3/56Yp/U3LSZWM1r6k9ICocT/YxQlVBWpvPJPvjaggiI16UuZjgbuUrahdsZrw uFZrPJWmaKS4inEZvx+urY0p7CNRHltRZRSoR2tplf0ck5r36AFhb+OvLcUvbbPIsHxG inug== X-Gm-Message-State: AMke39nNqR07M4+Y+OwHQP52Gkj3n/XxnxxWSvYE/AOrUiJyoaqQH2bMUyPVhlWiJQKgig== X-Received: by 10.98.204.216 with SMTP id j85mr27619722pfk.130.1487013331413; Mon, 13 Feb 2017 11:15:31 -0800 (PST) Received: from localhost.localdomain ([116.202.102.123]) by smtp.googlemail.com with ESMTPSA id m15sm16094858pfk.104.2017.02.13.11.15.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Feb 2017 11:15:30 -0800 (PST) From: Abhijit Naik To: gregkh@linuxfoundation.org Subject: [PATCH 2/2] staging: bcm2835-audio: Fixed checkpatch warning due to line spacing Date: Tue, 14 Feb 2017 00:42:17 +0530 Message-Id: <20170213191217.5201-2-abhijitnaik27@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170213191217.5201-1-abhijitnaik27@gmail.com> References: <20170213191217.5201-1-abhijitnaik27@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170213_111555_505732_BB81864F X-CRM114-Status: GOOD ( 13.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rjui@broadcom.com, Abhijit Naik , bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP bcm2835-vchiq.c: fixing ERROR: Checkpatch warnings due to extra blank lines or absence of blank lines where needed. Signed-off-by: Abhijit Naik --- drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) -- 2.11.0 diff --git a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c index d11f2cdd1014..af0cd0b36bc5 100644 --- a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c @@ -78,7 +78,6 @@ static int bcm2835_audio_start_worker(struct bcm2835_alsa_stream *alsa_stream); static int bcm2835_audio_write_worker(struct bcm2835_alsa_stream *alsa_stream, unsigned int count, void *src); - // Routine to send a message across a service static int @@ -109,6 +108,7 @@ static void my_wq_function(struct work_struct *work) struct bcm2835_audio_work *w = container_of(work, struct bcm2835_audio_work, my_work); int ret = -9; + LOG_DBG(" .. IN %p:%d\n", w->alsa_stream, w->cmd); switch (w->cmd) { case BCM2835_AUDIO_START: @@ -132,6 +132,7 @@ static void my_wq_function(struct work_struct *work) int bcm2835_audio_start(struct bcm2835_alsa_stream *alsa_stream) { int ret = -1; + LOG_DBG(" .. IN\n"); if (alsa_stream->my_wq) { struct bcm2835_audio_work *work = @@ -153,6 +154,7 @@ int bcm2835_audio_start(struct bcm2835_alsa_stream *alsa_stream) int bcm2835_audio_stop(struct bcm2835_alsa_stream *alsa_stream) { int ret = -1; + LOG_DBG(" .. IN\n"); if (alsa_stream->my_wq) { struct bcm2835_audio_work *work = @@ -175,6 +177,7 @@ int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream, unsigned int count, void *src) { int ret = -1; + LOG_DBG(" .. IN\n"); if (alsa_stream->my_wq) { struct bcm2835_audio_work *work = @@ -219,6 +222,7 @@ static void audio_vchi_callback(void *param, int status; int msg_len; struct vc_audio_msg m; + LOG_DBG(" .. IN instance=%p, handle=%p, alsa=%p, reason=%d, handle=%p\n", instance, instance ? instance->vchi_handle[0] : NULL, instance ? instance->alsa_stream : NULL, reason, msg_handle); @@ -244,6 +248,7 @@ static void audio_vchi_callback(void *param, complete(&instance->msg_avail_comp); } else if (m.type == VC_AUDIO_MSG_TYPE_COMPLETE) { struct bcm2835_alsa_stream *alsa_stream = instance->alsa_stream; + LOG_DBG(" .. instance=%p, m.type=VC_AUDIO_MSG_TYPE_COMPLETE, complete=%d\n", instance, m.u.complete.count); if (m.u.complete.cookie1 != BCM2835_AUDIO_WRITE_COOKIE1 || @@ -357,6 +362,7 @@ static int vc_vchi_audio_deinit(struct bcm2835_audio_instance *instance) /* Close all VCHI service connections */ for (i = 0; i < instance->num_connections; i++) { int status; + LOG_DBG(" .. %i:closing %p\n", i, instance->vchi_handle[i]); vchi_service_use(instance->vchi_handle[i]); @@ -384,6 +390,7 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream struct bcm2835_audio_instance *instance = (struct bcm2835_audio_instance *)alsa_stream->instance; int ret; + LOG_DBG(" .. IN\n"); LOG_INFO("%s: start\n", __func__); @@ -445,6 +452,7 @@ int bcm2835_audio_open(struct bcm2835_alsa_stream *alsa_stream) struct vc_audio_msg m; int status; int ret; + LOG_DBG(" .. IN\n"); my_workqueue_init(alsa_stream); @@ -494,6 +502,7 @@ static int bcm2835_audio_set_ctls_chan(struct bcm2835_alsa_stream *alsa_stream, struct bcm2835_audio_instance *instance = alsa_stream->instance; int status; int ret; + LOG_DBG(" .. IN\n"); LOG_INFO(" Setting ALSA dest(%d), volume(%d)\n", @@ -551,6 +560,7 @@ int bcm2835_audio_set_ctls(struct bcm2835_chip *chip) { int i; int ret = 0; + LOG_DBG(" .. IN\n"); LOG_DBG(" Setting ALSA dest(%d), volume(%d)\n", chip->dest, chip->volume); @@ -580,6 +590,7 @@ int bcm2835_audio_set_params(struct bcm2835_alsa_stream *alsa_stream, struct bcm2835_audio_instance *instance = alsa_stream->instance; int status; int ret; + LOG_DBG(" .. IN\n"); LOG_INFO(" Setting ALSA channels(%d), samplerate(%d), bits-per-sample(%d)\n", @@ -655,6 +666,7 @@ static int bcm2835_audio_start_worker(struct bcm2835_alsa_stream *alsa_stream) struct bcm2835_audio_instance *instance = alsa_stream->instance; int status; int ret; + LOG_DBG(" .. IN\n"); if (mutex_lock_interruptible(&instance->vchi_mutex)) { @@ -693,6 +705,7 @@ static int bcm2835_audio_stop_worker(struct bcm2835_alsa_stream *alsa_stream) struct bcm2835_audio_instance *instance = alsa_stream->instance; int status; int ret; + LOG_DBG(" .. IN\n"); if (mutex_lock_interruptible(&instance->vchi_mutex)) { @@ -732,6 +745,7 @@ int bcm2835_audio_close(struct bcm2835_alsa_stream *alsa_stream) struct bcm2835_audio_instance *instance = alsa_stream->instance; int status; int ret; + LOG_DBG(" .. IN\n"); my_workqueue_quit(alsa_stream); @@ -839,6 +853,7 @@ static int bcm2835_audio_write_worker(struct bcm2835_alsa_stream *alsa_stream, } else { while (count > 0) { int bytes = min((int) m.u.write.max_packet, (int) count); + status = bcm2835_vchi_msg_queue(instance->vchi_handle[0], src, bytes); src = (char *)src + bytes; @@ -885,6 +900,7 @@ void bcm2835_audio_flush_playback_buffers(struct bcm2835_alsa_stream *alsa_strea unsigned int bcm2835_audio_retrieve_buffers(struct bcm2835_alsa_stream *alsa_stream) { unsigned int count = atomic_read(&alsa_stream->retrieved); + atomic_sub(count, &alsa_stream->retrieved); return count; }