public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Xiaogeng (Shawn) Jin" <xjin@redswitch.com>
To: linux-mtd@lists.infradead.org,  linuxppc-embedded@lists.linuxppc.org
Subject: rq_data_dir() in linux/blkdev.h is redundant
Date: Thu, 09 Jan 2003 18:37:45 -0800	[thread overview]
Message-ID: <3E1E31F9.3020700@redswitch.com> (raw)

Hi,

When compiling linuxppc_2_4_devel (2.4.21-pre3) with the latest 
MTD/JFFS2 code, I had such error posted in a previous message.

ppc_8xx-gcc -D__KERNEL__ 
-I/u/xjin/2_4_devel/Software/Linux/MPC855/linuxppc_2_4_
devel/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 
-fno-strict-aliasing
-fno-common -fomit-frame-pointer 
-I/u/xjin/2_4_devel/Software/Linux/MPC855/linux
ppc_2_4_devel/arch/ppc -fsigned-char -msoft-float -pipe -ffixed-r2 
-Wno-uninitia
lized -mmultiple -mstring   -nostdinc -I 
/opt/eldk2.0/usr/lib/gcc-lib/ppc-linux/
2.95.4/include -DKBUILD_BASENAME=mtdblock_core  -c -o mtdblock-core.o 
mtdblock-c
ore.c
In file included from 
/u/xjin/2_4_devel/Software/Linux/MPC855/linuxppc_2_4_devel
/include/linux/blk.h:4,
                  from mtdblock-core.c:18:
/u/xjin/2_4_devel/Software/Linux/MPC855/linuxppc_2_4_devel/include/linux/blkdev.
h:147: parse error before `struct'

After traced down the problem, I found that it was caused by the 
definition of rq_data_dir() in linux/blkdev.h. The definition is as 
follows, which seems to be useless.

extern inline int rq_data_dir(struct request *rq)
{
	if (rq->cmd == READ)
		return READ;
	else if (rq->cmd == WRITE)
		return WRITE;
	else {
		BUG();
		return -1;
	}
}

Actually linux/mtd/compacmatmac.h defines rq_data_dir() as
   #define rq_data_dir(x) ((x)->cmd)
if the kernel version is older than 2.5.0.

-- 
Shawn Jin
RedSwitch Inc.

                 reply	other threads:[~2003-01-10  2:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E1E31F9.3020700@redswitch.com \
    --to=xjin@redswitch.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox