Skip to content

cpu/sam0_common: fix assert in periph/flashpage#8233

Merged
miri64 merged 1 commit intoRIOT-OS:masterfrom
smlng:cpu/sam0/fix_flashpage
Dec 11, 2017
Merged

cpu/sam0_common: fix assert in periph/flashpage#8233
miri64 merged 1 commit intoRIOT-OS:masterfrom
smlng:cpu/sam0/fix_flashpage

Conversation

@smlng
Copy link
Copy Markdown
Member

@smlng smlng commented Dec 10, 2017

needed for #8080, fixes an error with comparison of pointer and int.

@smlng smlng added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Dec 10, 2017
Copy link
Copy Markdown
Member

@dylad dylad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ! Change looks good, I tested on SAML21-XPRO it works but I encountered some issues which are not related to this PR. I'll open an issue about that later.

@miri64 miri64 merged commit 329c6bf into RIOT-OS:master Dec 11, 2017

/* ensure the length doesn't exceed the actual flash size */
assert(((uint8_t*)target_addr + len) <
assert(((unsigned)target_addr + len) <
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be uintptr_t?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this is another possibility.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it consistent with other asserts in this file, so either leave as is (which works) or change all assert to use uintptr_t. But I guess than we can grep all-over RIOT to fix that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@aabadie aabadie added this to the Release 2018.01 milestone Jan 18, 2018
@smlng smlng deleted the cpu/sam0/fix_flashpage branch February 6, 2018 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants