From mboxrd@z Thu Jan 1 00:00:00 1970 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 90F13C0015E for ; Mon, 24 Jul 2023 14:31:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230418AbjGXObz (ORCPT ); Mon, 24 Jul 2023 10:31:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbjGXObv (ORCPT ); Mon, 24 Jul 2023 10:31:51 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51686A4 for ; Mon, 24 Jul 2023 07:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690209110; x=1721745110; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=+5gG+0+scvDqbfX5/L0lqS4BwovP5AcRlSaFF9Lgp1c=; b=fchlWQPx2n/WHU9ps3TAMGDgiDhxgrdns4ok+8ShBg9gnGLW9nzZj1lt /38vPeUk1pKOsyTR0RJaDne6UGl/hEwdwX/qRsiQEv/iBELVox46SQFsD tkW+KObP/RcU38Br3cIrHOY5g08ANyVOUa0geWfuFInTk6fVvfQWxxIm6 1zhQIT30z/3H4yhZpz7PnxdblTCPYw3BAJ85zVbHitQM0jtcpGKGcm0Wk LsJrQA8J7htvyQb8ApoKKZ1n2/vqbH9WFAGV6oSkwYqRfZ2V0+TSzUG46 0y0ofH+C1bWy1Nuf4hSyrbkpajMIbAJc1gjz9ajXiA7EigBY36ES3Z4Wp Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="398362893" X-IronPort-AV: E=Sophos;i="6.01,228,1684825200"; d="scan'208";a="398362893" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2023 07:31:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="790986713" X-IronPort-AV: E=Sophos;i="6.01,228,1684825200"; d="scan'208";a="790986713" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 24 Jul 2023 07:31:24 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 08F591A6; Mon, 24 Jul 2023 17:31:32 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-um@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Richard Weinberger , Anton Ivanov , Johannes Berg , Rasmus Villemoes , Andrew Morton , Herve Codina , "Jason A. Donenfeld" , Yang Guang , kernel test robot Subject: [PATCH v2 1/1] Revert "um: Use swap() to make code cleaner" Date: Mon, 24 Jul 2023 17:31:31 +0300 Message-Id: <20230724143131.30090-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 9b0da3f22307af693be80f5d3a89dc4c7f360a85. The sigio.c is clearly user space code which is handled by arch/um/scripts/Makefile.rules (see USER_OBJS rule). The above mentioned commit simply broke this agreement, we may not use Linux kernel internal headers in them without thorough thinking. Hence, revert the wrong commit. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202307212304.cH79zJp1-lkp@intel.com/ Signed-off-by: Andy Shevchenko --- v2: fixed typo (h --> c), added Reported-by tag arch/um/os-Linux/sigio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c index 37d60e72cf26..9e71794839e8 100644 --- a/arch/um/os-Linux/sigio.c +++ b/arch/um/os-Linux/sigio.c @@ -3,7 +3,6 @@ * Copyright (C) 2002 - 2008 Jeff Dike (jdike@{addtoit,linux.intel}.com) */ -#include #include #include #include @@ -51,7 +50,7 @@ static struct pollfds all_sigio_fds; static int write_sigio_thread(void *unused) { - struct pollfds *fds; + struct pollfds *fds, tmp; struct pollfd *p; int i, n, respond_fd; char c; @@ -78,7 +77,9 @@ static int write_sigio_thread(void *unused) "write_sigio_thread : " "read on socket failed, " "err = %d\n", errno); - swap(current_poll, next_poll); + tmp = current_poll; + current_poll = next_poll; + next_poll = tmp; respond_fd = sigio_private[1]; } else { -- 2.40.0.1.gaa8946217a0b