Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0067cc99 authored by Paolo Ciarrocchi's avatar Paolo Ciarrocchi Committed by Ingo Molnar
Browse files

x86: coding style fixes to arch/x86/kernel/mca_32.c



Before:
   total: 42 errors, 3 warnings, 469 lines checked
After:
   total: 0 errors, 3 warnings, 479 lines checked

No code changed:

arch/x86/kernel/mca_32.o:

   text	   data	    bss	    dec	    hex	filename
   1832	    288	      5	   2125	    84d	mca_32.o.before
   1832	    288	      5	   2125	    84d	mca_32.o.after

md5:
   c0e45e2b743ce26349eb07dc53e80b94  mca_32.o.before.asm
   c0e45e2b743ce26349eb07dc53e80b94  mca_32.o.after.asm

Signed-off-by: default avatarPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f73920cd
Loading
Loading
Loading
Loading
+53 −43
Original line number Diff line number Diff line
@@ -53,9 +53,9 @@
#include <linux/init.h>
#include <asm/arch_hooks.h>

static unsigned char which_scsi = 0;
static unsigned char which_scsi;

int MCA_bus = 0;
int MCA_bus;
EXPORT_SYMBOL(MCA_bus);

/*
@@ -68,7 +68,8 @@ static DEFINE_SPINLOCK(mca_lock);

/* Build the status info for the adapter */

static void mca_configure_adapter_status(struct mca_device *mca_dev) {
static void mca_configure_adapter_status(struct mca_device *mca_dev)
{
	mca_dev->status = MCA_ADAPTER_NONE;

	mca_dev->pos_id = mca_dev->pos[0]
@@ -76,7 +77,8 @@ static void mca_configure_adapter_status(struct mca_device *mca_dev) {

	if (!mca_dev->pos_id && mca_dev->slot < MCA_MAX_SLOT_NR) {

		/* id = 0x0000 usually indicates hardware failure,
		/*
		 * id = 0x0000 usually indicates hardware failure,
		 * however, ZP Gu (zpg@castle.net> reports that his 9556
		 * has 0x0000 as id and everything still works. There
		 * also seem to be an adapter with id = 0x0000; the
@@ -89,7 +91,8 @@ static void mca_configure_adapter_status(struct mca_device *mca_dev) {
		return;
	} else if (mca_dev->pos_id != 0xffff) {

		/* 0xffff usually indicates that there's no adapter,
		/*
		 * 0xffff usually indicates that there's no adapter,
		 * however, some integrated adapters may have 0xffff as
		 * their id and still be valid. Examples are on-board
		 * VGA of the 55sx, the integrated SCSI of the 56 & 57,
@@ -133,7 +136,7 @@ static struct resource mca_standard_resources[] = {

#define MCA_STANDARD_RESOURCES	ARRAY_SIZE(mca_standard_resources)

/**
/*
 *	mca_read_and_store_pos - read the POS registers into a memory buffer
 *      @pos: a char pointer to 8 bytes, contains the POS register value on
 *            successful return
@@ -141,12 +144,14 @@ static struct resource mca_standard_resources[] = {
 *	Returns 1 if a card actually exists (i.e. the pos isn't
 *	all 0xff) or 0 otherwise
 */
static int mca_read_and_store_pos(unsigned char *pos) {
static int mca_read_and_store_pos(unsigned char *pos)
{
	int j;
	int found = 0;

	for (j = 0; j < 8; j++) {
		if((pos[j] = inb_p(MCA_POS_REG(j))) != 0xff) {
		pos[j] = inb_p(MCA_POS_REG(j));
		if (pos[j] != 0xff) {
			/* 0xff all across means no device. 0x00 means
			 * something's broken, but a device is
			 * probably there.  However, if you get 0x00
@@ -251,7 +256,8 @@ static int __init mca_init(void)
	short mca_builtin_scsi_ports[] = {0xf7, 0xfd, 0x00};
	struct mca_bus *bus;

	/* WARNING: Be careful when making changes here. Putting an adapter
	/*
	 * WARNING: Be careful when making changes here. Putting an adapter
	 * and the motherboard simultaneously into setup mode may result in
	 * damage to chips (according to The Indispensible PC Hardware Book
	 * by Hans-Peter Messmer). Also, we disable system interrupts (so
@@ -326,7 +332,8 @@ static int __init mca_init(void)
	mca_dev->slot = MCA_INTEGVIDEO;
	mca_register_device(MCA_PRIMARY_BUS, mca_dev);

	/* Put motherboard into scsi setup mode, read integrated scsi
	/*
	 * Put motherboard into scsi setup mode, read integrated scsi
	 * POS registers, and turn motherboard setup off.
	 *
	 * It seems there are two possible SCSI registers. Martin says that
@@ -364,7 +371,8 @@ static int __init mca_init(void)

	outb_p(0xff, MCA_MOTHERBOARD_SETUP_REG);

	/* Now loop over MCA slots: put each adapter into setup mode, and
	/*
	 * Now loop over MCA slots: put each adapter into setup mode, and
	 * read its POS registers. Then put adapter setup off.
	 */

@@ -448,7 +456,8 @@ static int __kprobes mca_handle_nmi_callback(struct device *dev, void *data)
	pos5 = mca_device_read_pos(mca_dev, 5);

	if (!(pos5 & 0x80)) {
		/* Bit 7 of POS 5 is reset when this adapter has a hardware
		/*
		 *  Bit 7 of POS 5 is reset when this adapter has a hardware
		 * error. Bit 7 it reset if there's error information
		 * available in POS 6 and 7.
		 */
@@ -460,7 +469,8 @@ static int __kprobes mca_handle_nmi_callback(struct device *dev, void *data)

void __kprobes mca_handle_nmi(void)
{
	/* First try - scan the various adapters and see if a specific
	/*
	 *  First try - scan the various adapters and see if a specific
	 * adapter was responsible for the error.
	 */
	bus_for_each_dev(&mca_bus_type, NULL, NULL, mca_handle_nmi_callback);