From patchwork Sat Dec 22 01:57:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 1905141 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 003883FE37 for ; Sat, 22 Dec 2012 02:00:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752766Ab2LVB6g (ORCPT ); Fri, 21 Dec 2012 20:58:36 -0500 Received: from mail-ia0-f174.google.com ([209.85.210.174]:34664 "EHLO mail-ia0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752645Ab2LVB6d (ORCPT ); Fri, 21 Dec 2012 20:58:33 -0500 Received: by mail-ia0-f174.google.com with SMTP id y25so4415205iay.5 for ; Fri, 21 Dec 2012 17:58:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=wytW8tAGlvmn5Hu/KGFZnvBbMZYh79huLITO+pJtcoU=; b=EGCQ8bgaAxnbimSfsAtxNQjaMHYJ19M6k5hfVQDLckiMkmu4aoiEyy8q14ufD9TarM HLZPeDtOPDHKfDEc39Sm83w0KULRFV4g78Qp4CU9gvEMV3uvniLzOnEpaxM/V4RY1VA/ eoO154sIO7jPuAFG3/iy6gxmL2vr7VlmEbKfM9ILJLSanuc37pg6Fpy2pj++B7ssWyWj Rj0Um/HLFEyir6oNjzLCB4MUDBuCUC6PB8Lkb4ZvLwGT+vzYZW8L7zw3jRIsoGCtuj5Y vukLMinxOTv3+VDEEQ0y6PYss+qqywZZo91D7CXSf3CBSWABGU0KqWVY0zNe0vCwqJXm EqmQ== X-Received: by 10.50.40.133 with SMTP id x5mr14988202igk.32.1356141513116; Fri, 21 Dec 2012 17:58:33 -0800 (PST) Received: from htj.dyndns.org.com (c-69-181-251-227.hsd1.ca.comcast.net. [69.181.251.227]) by mx.google.com with ESMTPS id v12sm10975374igv.3.2012.12.21.17.58.31 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Dec 2012 17:58:32 -0800 (PST) From: Tejun Heo To: linux-kernel@vger.kernel.org Cc: Tejun Heo , Guennadi Liakhovetski , Ian Molton , linux-mmc@vger.kernel.org Subject: [PATCH 18/25] TMIO MMC: don't use [delayed_]work_pending() Date: Fri, 21 Dec 2012 17:57:08 -0800 Message-Id: <1356141435-17340-19-git-send-email-tj@kernel.org> X-Mailer: git-send-email 1.8.0.2 In-Reply-To: <1356141435-17340-1-git-send-email-tj@kernel.org> References: <1356141435-17340-1-git-send-email-tj@kernel.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org There's no need to test whether a (delayed) work item in pending before queueing, flushing or cancelling it. Most uses are unnecessary and quite a few of them are buggy. Remove unnecessary pending tests from tmio mmc. Only compile tested. Signed-off-by: Tejun Heo Cc: Guennadi Liakhovetski Cc: Ian Molton Cc: linux-mmc@vger.kernel.org Acked-by: Guennadi Liakhovetski --- Please let me know how this patch should be routed. I can take it through the workqueue tree if necessary. Thanks. drivers/mmc/host/tmio_mmc_pio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 50bf495..f4f18b3 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -573,8 +573,7 @@ static bool __tmio_mmc_card_detect_irq(struct tmio_mmc_host *host, tmio_mmc_ack_mmc_irqs(host, TMIO_STAT_CARD_INSERT | TMIO_STAT_CARD_REMOVE); if ((((ireg & TMIO_STAT_CARD_REMOVE) && mmc->card) || - ((ireg & TMIO_STAT_CARD_INSERT) && !mmc->card)) && - !work_pending(&mmc->detect.work)) + ((ireg & TMIO_STAT_CARD_INSERT) && !mmc->card))) mmc_detect_change(host->mmc, msecs_to_jiffies(100)); return true; }