From patchwork Fri Mar 11 15:28:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 8566551 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 986E39F38C for ; Fri, 11 Mar 2016 15:29:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1809202B8 for ; Fri, 11 Mar 2016 15:29:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 03A7120328 for ; Fri, 11 Mar 2016 15:29:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932623AbcCKP3s (ORCPT ); Fri, 11 Mar 2016 10:29:48 -0500 Received: from www.linutronix.de ([62.245.132.108]:37958 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932567AbcCKP3a (ORCPT ); Fri, 11 Mar 2016 10:29:30 -0500 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1aeP0C-0006Yk-QK; Fri, 11 Mar 2016 16:29:20 +0100 From: Sebastian Andrzej Siewior To: linux-scsi@vger.kernel.org Cc: "James E.J. Bottomley" , "Martin K. Petersen" , rt@linutronix.de, Sebastian Andrzej Siewior , Vasu Dev , Christoph Hellwig , fcoe-devel@open-fcoe.org Subject: [PATCH 02/11] scsi/fcoe: remove CONFIG_SMP in fcoe_percpu_thread_destroy() Date: Fri, 11 Mar 2016 16:28:54 +0100 Message-Id: <1457710143-29182-3-git-send-email-bigeasy@linutronix.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1457710143-29182-1-git-send-email-bigeasy@linutronix.de> References: <1457710143-29182-1-git-send-email-bigeasy@linutronix.de> X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001, URIBL_BLOCKED=0.001 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 There is only a marginal win in code size if the !SMP code is ifdeffed out. The compiler should be able to optimize almost everything out. Remove the ifdeffery for readability sake. Cc: Vasu Dev Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Christoph Hellwig Cc: fcoe-devel@open-fcoe.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- drivers/scsi/fcoe/fcoe.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 2b0d207f4b2b..efbc8a1438ef 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -1284,10 +1284,8 @@ static void fcoe_percpu_thread_destroy(unsigned int cpu) struct task_struct *thread; struct page *crc_eof; struct sk_buff *skb; -#ifdef CONFIG_SMP struct fcoe_percpu_s *p0; unsigned targ_cpu = get_cpu(); -#endif /* CONFIG_SMP */ FCOE_DBG("Destroying receive thread for CPU %d\n", cpu); @@ -1301,7 +1299,6 @@ static void fcoe_percpu_thread_destroy(unsigned int cpu) p->crc_eof_offset = 0; spin_unlock_bh(&p->fcoe_rx_list.lock); -#ifdef CONFIG_SMP /* * Don't bother moving the skb's if this context is running * on the same CPU that is having its thread destroyed. This @@ -1343,16 +1340,6 @@ static void fcoe_percpu_thread_destroy(unsigned int cpu) spin_unlock_bh(&p->fcoe_rx_list.lock); } put_cpu(); -#else - /* - * This a non-SMP scenario where the singular Rx thread is - * being removed. Free all skbs and stop the thread. - */ - spin_lock_bh(&p->fcoe_rx_list.lock); - while ((skb = __skb_dequeue(&p->fcoe_rx_list)) != NULL) - kfree_skb(skb); - spin_unlock_bh(&p->fcoe_rx_list.lock); -#endif if (thread) kthread_stop(thread);