On Tue, Nov 05, 2013 at 02:24:22AM +1000, David Gwynne wrote: > > On 5 Nov 2013, at 12:40 am, Kenneth R Westerback <kwesterb...@rogers.com> > wrote: > > > On Sun, Nov 03, 2013 at 10:51:43PM -0500, Brad Smith wrote: > >> LLVM errors out on the i2o code with the following warning.. > >> > >> ../../../../dev/i2o/iop.c:2399:42: error: comparison of unsigned > >> expression < 0 is always false [-Werror,-Wtautological-compare] > >> pt->pt_nbufs < 0 || pt->pt_replylen < 0 || > >> ~~~~~~~~~~~~~~~ ^ ~ > >> > >> Looking at the i2o code it looks as if the pt_replylen field isn't set > >> anywhere and > >> doesn't do anything. It looks like it can be garbage collected. > >> > >> Comments? OK? > > > > When WikiPedia describes i2o as a "defunct computer input/output > > specification" whose SIG was "open-source hostile" (and was disbanded > > in 2000), and which was implemented on only "a few server class > > machines", it is perhaps past time we lightened the kernel a bit. > > :-) > > where there any recent edits to that wikipedia page by a certain mr > westerback? >
Were there? I thought I pushed the 'cancel' button. Odd. .... Ken > > > > .... Ken > > > >> > >> > >> Index: iop.c > >> =================================================================== > >> RCS file: /home/cvs/src/sys/dev/i2o/iop.c,v > >> retrieving revision 1.38 > >> diff -u -p -r1.38 iop.c > >> --- iop.c 30 May 2013 16:15:02 -0000 1.38 > >> +++ iop.c 4 Nov 2013 03:13:45 -0000 > >> @@ -2396,8 +2396,9 @@ iop_passthrough(struct iop_softc *sc, st > >> pt->pt_msglen > (letoh16(sc->sc_status.inboundmframesize) << 2) || > >> pt->pt_msglen < sizeof(struct i2o_msg) || > >> pt->pt_nbufs > IOP_MAX_MSG_XFERS || > >> - pt->pt_nbufs < 0 || pt->pt_replylen < 0 || > >> - pt->pt_timo < 1000 || pt->pt_timo > 5*60*1000) > >> + pt->pt_nbufs < 0 || > >> + pt->pt_timo < 1000 || > >> + pt->pt_timo > 5*60*1000) > >> return (EINVAL); > >> > >> for (i = 0; i < pt->pt_nbufs; i++) > >> @@ -2446,8 +2447,6 @@ iop_passthrough(struct iop_softc *sc, st > >> i = (letoh32(im->im_rb->msgflags) >> 14) & ~3; > >> if (i > IOP_MAX_MSG_SIZE) > >> i = IOP_MAX_MSG_SIZE; > >> - if (i > pt->pt_replylen) > >> - i = pt->pt_replylen; > >> if ((rv = copyout(im->im_rb, pt->pt_reply, i)) != 0) > >> goto bad; > >> > >> Index: iopio.h > >> =================================================================== > >> RCS file: /home/cvs/src/sys/dev/i2o/iopio.h,v > >> retrieving revision 1.2 > >> diff -u -p -r1.2 iopio.h > >> --- iopio.h 26 Jun 2008 05:42:15 -0000 1.2 > >> +++ iopio.h 4 Nov 2013 03:14:02 -0000 > >> @@ -57,7 +57,6 @@ struct ioppt { > >> void *pt_msg; /* pointer to message buffer */ > >> size_t pt_msglen; /* message buffer size in bytes */ > >> void *pt_reply; /* pointer to reply buffer */ > >> - size_t pt_replylen; /* reply buffer size in bytes */ > >> int pt_timo; /* completion timeout in ms */ > >> int pt_nbufs; /* number of transfers */ > >> struct ioppt_buf pt_bufs[IOP_MAX_MSG_XFERS]; /* transfers */ > >> > >> -- > >> This message has been scanned for viruses and > >> dangerous content by MailScanner, and is > >> believed to be clean. > >> > > >