From patchwork Thu Jul 11 16:02:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Alves X-Patchwork-Id: 2826500 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 341959F7D6 for ; Thu, 11 Jul 2013 16:03:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F37592027E for ; Thu, 11 Jul 2013 16:03:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA5D82027C for ; Thu, 11 Jul 2013 16:02:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932167Ab3GKQC5 (ORCPT ); Thu, 11 Jul 2013 12:02:57 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:35260 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755735Ab3GKQC5 (ORCPT ); Thu, 11 Jul 2013 12:02:57 -0400 Received: by mail-wg0-f41.google.com with SMTP id y10so12140266wgg.4 for ; Thu, 11 Jul 2013 09:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=pQ+tATFsu+wemI4PnB0MK+ga4yB+uFE4gVU5fGGuAWM=; b=Dkgm/aIrRtfap/MrQt0Esi6BntzNtEGTvr/DGLcVuXdpzjfZk3e3JnGRQ6iLNd3EVb XpYe1C6pxxGUu7qmCP3I37TPwHa69X3DLYikcAEZP6hd/miP7EXXUyhIiplDqRPK349/ cTMEJLN6+YKoYa7WjUZA/isj+Y6mL7uqHGP61f3GeNHiB/b58N2RjB8TRuLWEPjLXTTv rcI9d+5LiPX5yiZ+9BisEDRQWt6Hv8Eg5oTJ/NE0FND86mwMT0nQya7ZOLCM/iQvQei1 GMqcgSW0sTXRsz/leRhPKYW//RRrFtfzLi/zSz1CINZPbqwEDHkkrQlr89U6oa6M7EwP HJAA== X-Received: by 10.180.8.170 with SMTP id s10mr4784766wia.21.1373558575845; Thu, 11 Jul 2013 09:02:55 -0700 (PDT) Received: from xsys-lnx.lan (a89-152-208-145.cpe.netcabo.pt. [89.152.208.145]) by mx.google.com with ESMTPSA id o10sm43141197wiz.5.2013.07.11.09.02.52 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Jul 2013 09:02:54 -0700 (PDT) From: Luis Alves To: linux-media@vger.kernel.org Cc: mchehab@infradead.org, crope@iki.fi, Luis Alves Subject: [PATCH] Fixed misleading error when handling IR interrupts. Date: Thu, 11 Jul 2013 17:02:44 +0100 Message-Id: <1373558564-14968-1-git-send-email-ljalvs@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, Handling the AV Core/IR interrupts schedules its workqueue but the schedule_work function returns false if @work was already on the kernel-global workqueue and true otherwise. Printing an error message if @work wasn't in the queue is wrong. Regards, Luis Signed-off-by: Luis Alves --- drivers/media/pci/cx23885/cx23885-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index 268654a..9f63d93 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c @@ -1941,10 +1941,7 @@ static irqreturn_t cx23885_irq(int irq, void *dev_id) if ((pci_status & pci_mask) & PCI_MSK_AV_CORE) { cx23885_irq_disable(dev, PCI_MSK_AV_CORE); - if (!schedule_work(&dev->cx25840_work)) - printk(KERN_ERR "%s: failed to set up deferred work for" - " AV Core/IR interrupt. Interrupt is disabled" - " and won't be re-enabled\n", dev->name); + schedule_work(&dev->cx25840_work); handled++; }