Home | History | Annotate | Download | only in gpib
History log of /src/sys/dev/gpib/ppi.c
RevisionDateAuthorComments
 1.25  12-Nov-2019  msaitoh Add missing initialization of sc_dev.
 1.24  03-Sep-2018  riastradh branches: 1.24.4;
Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.23  28-Oct-2017  riastradh branches: 1.23.2; 1.23.4;
Kill some more extern struct cfdriver declarations.

Down with externs in .c!
 1.22  25-Jul-2014  dholland branches: 1.22.20;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.21  16-Mar-2014  dholland branches: 1.21.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.20  27-Oct-2012  chs branches: 1.20.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.19  12-Sep-2009  tsutsui branches: 1.19.12; 1.19.22;
Fix warnings of printf(9) format.
 1.18  12-Sep-2009  tsutsui Add a missing parentheses. PR kern/41859
 1.17  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.16  12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.15  14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.14  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.13  12-Jun-2008  cegger branches: 1.13.4; 1.13.10;
- use device_lookup to get device_t
- use device_lookup_private to get softc
- ansify
 1.12  28-Apr-2008  martin branches: 1.12.2; 1.12.4;
Remove clause 3 and 4 from TNF licenses
 1.11  08-Apr-2008  cegger branches: 1.11.2; 1.11.4;
use aprint_*_dev and device_xname
 1.10  09-Jul-2007  ad branches: 1.10.28;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.9  04-Mar-2007  christos branches: 1.9.2; 1.9.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.8  16-Feb-2007  ad branches: 1.8.2;
Fix spllowersoftclock() fallout.
 1.7  13-Jan-2007  cube Complete initializers, teach drivers that we moved from struct proc to
struct lwp, sprinkle some needed const qualifiers.
 1.6  29-Mar-2006  thorpej branches: 1.6.8;
Use device_private().
 1.5  28-Mar-2006  thorpej Use device_unit().
 1.4  11-Dec-2005  christos branches: 1.4.4; 1.4.6; 1.4.8; 1.4.10; 1.4.12;
merge ktrace-lwp.
 1.3  27-Feb-2005  perry branches: 1.3.4;
nuke trailing whitespace
 1.2  07-Aug-2003  agc branches: 1.2.8; 1.2.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1  02-Jun-2003  gmcgarry branches: 1.1.2;
Port the hp300 ppi driver to the MI gpib framework.
 1.1.2.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1  03-Aug-2004  skrll Sync with HEAD
 1.2.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.2.8.1  29-Apr-2005  kent sync with -current
 1.3.4.3  03-Sep-2007  yamt sync with head.
 1.3.4.2  26-Feb-2007  yamt sync with head.
 1.3.4.1  21-Jun-2006  yamt sync with head.
 1.4.12.1  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.4.10.1  19-Apr-2006  elad sync with head.
 1.4.8.1  01-Apr-2006  yamt sync with head.
 1.4.6.1  22-Apr-2006  simonb Sync with head.
 1.4.4.1  09-Sep-2006  rpaulo sync with head
 1.6.8.1  01-Feb-2007  ad Sync with head.
 1.8.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.9.4.1  11-Jul-2007  mjf Sync with head.
 1.9.2.1  01-Jul-2007  ad Adapt to callout API change.
 1.10.28.2  29-Jun-2008  mjf Sync with HEAD.
 1.10.28.1  02-Jun-2008  mjf Sync with HEAD.
 1.11.4.4  16-Sep-2009  yamt sync with head
 1.11.4.3  16-May-2009  yamt sync with head
 1.11.4.2  04-May-2009  yamt sync with head.
 1.11.4.1  16-May-2008  yamt sync with head.
 1.11.2.2  17-Jun-2008  yamt sync with head.
 1.11.2.1  18-May-2008  yamt sync with head.
 1.12.4.1  18-Jun-2008  simonb Sync with head.
 1.12.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.13.10.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.4.1  28-Apr-2009  skrll Sync with HEAD.
 1.19.22.3  03-Dec-2017  jdolecek update from HEAD
 1.19.22.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.22.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.12.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19.12.1  30-Oct-2012  yamt sync with head
 1.20.2.1  18-May-2014  rmind sync with head
 1.21.2.1  10-Aug-2014  tls Rebase.
 1.22.20.1  14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1439):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.


Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.


Add missing initialization of sc_dev.
 1.23.4.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.23.4.1  10-Jun-2019  christos Sync with HEAD
 1.23.2.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.24.4.1  14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #425):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.

Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.

Add missing initialization of sc_dev.

RSS XML Feed