Received: from list by lists.gnu.org with archive (Exim 4.71) id 1h23M3-0005r2-Ar for mharc-grub-devel@gnu.org; Thu, 07 Mar 2019 19:27:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h23M0-0005qB-1w for grub-devel@gnu.org; Thu, 07 Mar 2019 19:27:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h23Ly-0002vb-SB for grub-devel@gnu.org; Thu, 07 Mar 2019 19:27:12 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:50936) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h23Ly-0002tq-IU for grub-devel@gnu.org; Thu, 07 Mar 2019 19:27:10 -0500 Received: by mail-wm1-x342.google.com with SMTP id x7so11007059wmj.0 for ; Thu, 07 Mar 2019 16:27:09 -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 :mime-version:content-transfer-encoding; bh=Z5+UtkUpdf19HpX/WJ8EggbybJrUTCcykyCH3FioL8w=; b=F1vwjRnIxpt1GuIWlP8EuGQUEMZ4OURh3rUt9+oHuqLOIVRscE32XLz1ajtmOxxcu4 X9yVa3ddkLplPwsJd+O/Llj4SrfeinokfAD8TNskklVnczKd3Nc+9KmY6M9sX0/fjY/9 mYa6t+iZWf2Svk5VroORUyc0oRy1uKC0y3+Y5jQ2GfCobmxHB1vMqzKl/8ksrEnP1PQV 1uuXdU3PysGQIbNBtCx874Md/IY5xz/jU7Beq+Emu13ZtW79uxFw9vPJ9E1GuXF9buh2 fUKMVioru1+5lovQKo2JQdZ1UmOsOvk0ri12gC85JKP98XtgIqX8gXUPn6R2Rqhwj9/3 K2lg== 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:mime-version:content-transfer-encoding; bh=Z5+UtkUpdf19HpX/WJ8EggbybJrUTCcykyCH3FioL8w=; b=QfVxmldx0fErE2rYLIPFlMg0crnTwvBif1ugboHYBkxO58gKB6SQvVt64pVPkPN2Rw KsEAsy/zNF32z1S10Vsdv334gFXmjTFGgHrDjFPe917lVPn77t6r0e40ZjKW8AfHI0v+ 2/Wc1CTwauBAap9a+MA0QqQaX7mvSgL8CrGYSdWxMem4nxoATtHFAFv4HTHcBoSd9nyI 3gpY0fMdK7VUSi/raz3coIklr42pG0Q96pYfWQHskah7O/KEcnqZueZXrWltsTSOadIx wPS0kjOIEK4tj+kTEn191yJGSNneFkvtj1d0LTAYk00Gufq3GCVCGL34LJ9/uZjlW9SG LTnQ== X-Gm-Message-State: APjAAAUEl0UAVZvoSQa9ZMJ1fhsMOQ82exhC9IrOPbIvNMrvdA3cWsc/ ssU9SIR2X28HJwSQqMIBwry0VOlV X-Google-Smtp-Source: APXvYqx7HmPJS/Ud5rPiCKf3gwdO6MxYeKClCV2xTBX3mvUBA1HxZpUp+9ZRwcK8oj0eNgBw+ceIIw== X-Received: by 2002:a1c:9dcc:: with SMTP id g195mr7658952wme.9.1552004828253; Thu, 07 Mar 2019 16:27:08 -0800 (PST) Received: from izanagi.home.vikt0ry.com (112.red-81-47-147.staticip.rima-tde.net. [81.47.147.112]) by smtp.gmail.com with ESMTPSA id o8sm10436916wma.1.2019.03.07.16.27.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2019 16:27:07 -0800 (PST) From: =?UTF-8?q?Jes=C3=BAs=20Di=C3=A9guez=20Fern=C3=A1ndez?= To: grub-devel@gnu.org Cc: =?UTF-8?q?Jes=C3=BAs=20Di=C3=A9guez=20Fern=C3=A1ndez?= Subject: [PATCH v3 1/2] Replace __asm__ __volatile__ with asm volatile. Date: Fri, 8 Mar 2019 01:26:36 +0100 Message-Id: <20190308002637.31530-2-jesusdf@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190308002637.31530-1-jesusdf@gmail.com> References: <20190308002637.31530-1-jesusdf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 00:27:13 -0000 In order to maintain the coding style consistency, it was requested to replace the methods that use __asm__ __volatile__ with asm volatile. Signed-off-by: Jesús Diéguez Fernández Reviewed-by: Daniel Kiper --- grub-core/efiemu/runtime/efiemu.c | 10 +++++----- grub-core/lib/i386/halt.c | 2 +- include/grub/arm/time.h | 2 +- include/grub/arm64/time.h | 2 +- include/grub/i386/io.h | 12 ++++++------ include/grub/i386/time.h | 2 +- include/grub/i386/tsc.h | 2 +- include/grub/x86_64/time.h | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/grub-core/efiemu/runtime/efiemu.c b/grub-core/efiemu/runtime/efiemu.c index d923e409f..5db1f347b 100644 --- a/grub-core/efiemu/runtime/efiemu.c +++ b/grub-core/efiemu/runtime/efiemu.c @@ -174,17 +174,17 @@ efiemu_memset (grub_uint8_t *a, grub_uint8_t b, grub_size_t n) static inline void write_cmos (grub_uint8_t addr, grub_uint8_t val) { - __asm__ __volatile__ ("outb %%al,$0x70\n" - "mov %%cl, %%al\n" - "outb %%al,$0x71": :"a" (addr), "c" (val)); + asm volatile ("outb %%al,$0x70\n" + "mov %%cl, %%al\n" + "outb %%al,$0x71": :"a" (addr), "c" (val)); } static inline grub_uint8_t read_cmos (grub_uint8_t addr) { grub_uint8_t ret; - __asm__ __volatile__ ("outb %%al, $0x70\n" - "inb $0x71, %%al": "=a"(ret) :"a" (addr)); + asm volatile ("outb %%al, $0x70\n" + "inb $0x71, %%al": "=a"(ret) :"a" (addr)); return ret; } diff --git a/grub-core/lib/i386/halt.c b/grub-core/lib/i386/halt.c index 9f8405494..2364fe4d7 100644 --- a/grub-core/lib/i386/halt.c +++ b/grub-core/lib/i386/halt.c @@ -66,7 +66,7 @@ grub_halt (void) #endif /* Disable interrupts. */ - __asm__ __volatile__ ("cli"); + asm volatile ("cli"); /* Bochs, QEMU, etc. Removed in newer QEMU releases. */ for (i = 0; i < sizeof (bochs_shutdown) - 1; i++) diff --git a/include/grub/arm/time.h b/include/grub/arm/time.h index 4128506cb..c5a685225 100644 --- a/include/grub/arm/time.h +++ b/include/grub/arm/time.h @@ -23,7 +23,7 @@ static __inline void grub_cpu_idle (void) { /* FIXME: this can't work until we handle interrupts. */ -/* __asm__ __volatile__ ("wfi"); */ +/* asm volatile ("wfi"); */ } #endif /* ! KERNEL_CPU_TIME_HEADER */ diff --git a/include/grub/arm64/time.h b/include/grub/arm64/time.h index 4128506cb..c5a685225 100644 --- a/include/grub/arm64/time.h +++ b/include/grub/arm64/time.h @@ -23,7 +23,7 @@ static __inline void grub_cpu_idle (void) { /* FIXME: this can't work until we handle interrupts. */ -/* __asm__ __volatile__ ("wfi"); */ +/* asm volatile ("wfi"); */ } #endif /* ! KERNEL_CPU_TIME_HEADER */ diff --git a/include/grub/i386/io.h b/include/grub/i386/io.h index ae12a3e3d..e9cd80957 100644 --- a/include/grub/i386/io.h +++ b/include/grub/i386/io.h @@ -28,7 +28,7 @@ grub_inb (unsigned short int port) { unsigned char _v; - __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (port)); + asm volatile ("inb %w1,%0":"=a" (_v):"Nd" (port)); return _v; } @@ -37,7 +37,7 @@ grub_inw (unsigned short int port) { unsigned short _v; - __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (port)); + asm volatile ("inw %w1,%0":"=a" (_v):"Nd" (port)); return _v; } @@ -46,27 +46,27 @@ grub_inl (unsigned short int port) { unsigned int _v; - __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (port)); + asm volatile ("inl %w1,%0":"=a" (_v):"Nd" (port)); return _v; } static __inline void grub_outb (unsigned char value, unsigned short int port) { - __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port)); + asm volatile ("outb %b0,%w1": :"a" (value), "Nd" (port)); } static __inline void grub_outw (unsigned short int value, unsigned short int port) { - __asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (port)); + asm volatile ("outw %w0,%w1": :"a" (value), "Nd" (port)); } static __inline void grub_outl (unsigned int value, unsigned short int port) { - __asm__ __volatile__ ("outl %0,%w1": :"a" (value), "Nd" (port)); + asm volatile ("outl %0,%w1": :"a" (value), "Nd" (port)); } #endif /* _SYS_IO_H */ diff --git a/include/grub/i386/time.h b/include/grub/i386/time.h index 842882cf2..4da5ae93c 100644 --- a/include/grub/i386/time.h +++ b/include/grub/i386/time.h @@ -23,7 +23,7 @@ static __inline void grub_cpu_idle (void) { /* FIXME: this can't work until we handle interrupts. */ -/* __asm__ __volatile__ ("hlt"); */ +/* asm volatile ("hlt"); */ } #endif /* ! KERNEL_CPU_TIME_HEADER */ diff --git a/include/grub/i386/tsc.h b/include/grub/i386/tsc.h index 324174ded..947e62fa1 100644 --- a/include/grub/i386/tsc.h +++ b/include/grub/i386/tsc.h @@ -46,7 +46,7 @@ grub_get_tsc (void) grub_cpuid (0,a,b,c,d); /* Read TSC value. We cannot use "=A", since this would use %rax on x86_64. */ - __asm__ __volatile__ ("rdtsc":"=a" (lo), "=d" (hi)); + asm volatile ("rdtsc":"=a" (lo), "=d" (hi)); return (((grub_uint64_t) hi) << 32) | lo; } diff --git a/include/grub/x86_64/time.h b/include/grub/x86_64/time.h index 842882cf2..4da5ae93c 100644 --- a/include/grub/x86_64/time.h +++ b/include/grub/x86_64/time.h @@ -23,7 +23,7 @@ static __inline void grub_cpu_idle (void) { /* FIXME: this can't work until we handle interrupts. */ -/* __asm__ __volatile__ ("hlt"); */ +/* asm volatile ("hlt"); */ } #endif /* ! KERNEL_CPU_TIME_HEADER */ -- 2.17.1