Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Taylor R Campbell
> Date: Wed, 1 Apr 2020 07:42:53 -0700 > From: Jason Thorpe > > If PAGE_SIZE is ostensibly a vsize_t / size_t, why not define it as (1U << > PAGE_SHIFT)? Without running the following program, can you tell me what it will print? It might work to define PAGE_SIZE to be ((size_t)1 <<

Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Christos Zoulas
I think that PAGESIZE is not always a constant in our code. christos signature.asc Description: Message signed with OpenPGP

Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Robert Elz
Date:Wed, 1 Apr 2020 16:31:01 +0200 From:Kamil Rytarowski Message-ID: | Does it look better? | | http://netbsd.org/~kamil/patch-00244-fopsmapper-PAGE_SIZE.txt Apart from it needing to be (expressed in the relevant make syntax, whatever that is) if

Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Christos Zoulas
> If PAGE_SIZE is ostensibly a vsize_t / size_t, why not define it as (1U << > PAGE_SHIFT)? It will *probably* work unless we have 'if (negative_int > PAGESIZE)' somewhere. I guess if you make the change and the kernel boots... :-) christos signature.asc Description: Message signed with

Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Jason Thorpe
> On Apr 1, 2020, at 7:17 AM, Christos Zoulas wrote: > > Which we have been slowly fixing. I think in this case the sign-compare > warnings are annoying, but putting casts on each warning is cluttering > the code needlessly. Unfortunately the alternative (to make the PAGESIZE > constant

Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Kamil Rytarowski
On 01.04.2020 16:17, Christos Zoulas wrote: > In article , > Paul Goyette wrote: >> On Wed, 1 Apr 2020, Kamil Rytarowski wrote: >> >>> On 01.04.2020 15:47, Robert Elz wrote: Date:Wed, 1 Apr 2020 11:45:53 + From:"Kamil Rytarowski" Message-ID:

Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Christos Zoulas
In article , Paul Goyette wrote: >On Wed, 1 Apr 2020, Kamil Rytarowski wrote: > >> On 01.04.2020 15:47, Robert Elz wrote: >>> Date:Wed, 1 Apr 2020 11:45:53 + >>> From:"Kamil Rytarowski" >>> Message-ID: <20200401114554.05167f...@cvs.netbsd.org> >>> >>> | Log

Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Kamil Rytarowski
On 01.04.2020 16:10, Paul Goyette wrote: > On Wed, 1 Apr 2020, Kamil Rytarowski wrote: > >> On 01.04.2020 15:47, Robert Elz wrote: >>>     Date:    Wed, 1 Apr 2020 11:45:53 + >>>     From:    "Kamil Rytarowski" >>>     Message-ID:  <20200401114554.05167f...@cvs.netbsd.org> >>> >>>   |

Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Paul Goyette
On Wed, 1 Apr 2020, Kamil Rytarowski wrote: On 01.04.2020 15:47, Robert Elz wrote: Date:Wed, 1 Apr 2020 11:45:53 + From:"Kamil Rytarowski" Message-ID: <20200401114554.05167f...@cvs.netbsd.org> | Log Message: | Avoid comparison between signed and unsigned

Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Kamil Rytarowski
On 01.04.2020 15:47, Robert Elz wrote: > Date:Wed, 1 Apr 2020 11:45:53 + > From:"Kamil Rytarowski" > Message-ID: <20200401114554.05167f...@cvs.netbsd.org> > > | Log Message: > | Avoid comparison between signed and unsigned integer > | > | Cast PAGE_SIZE to

Re: CVS commit: src/sys/modules/examples/fopsmapper

2020-04-01 Thread Robert Elz
Date:Wed, 1 Apr 2020 11:45:53 + From:"Kamil Rytarowski" Message-ID: <20200401114554.05167f...@cvs.netbsd.org> | Log Message: | Avoid comparison between signed and unsigned integer | | Cast PAGE_SIZE to size_t. This kind of pedantry is going way too far,