This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21706 ) Change subject: icE1usb fw: define e1_data_ptr() using e1_data_ofs() ...................................................................... icE1usb fw: define e1_data_ptr() using e1_data_ofs() It's best to compute the offset only at one place and use that computation elsewhere. Change-Id: I9a6cce07ea8b6eff1527215de00621da960b0472 --- M firmware/ice40-riscv/icE1usb/e1.c 1 file changed, 5 insertions(+), 7 deletions(-) Approvals: laforge: Looks good to me, approved tnt: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/firmware/ice40-riscv/icE1usb/e1.c b/firmware/ice40-riscv/icE1usb/e1.c index e5108ce..776edba 100644 --- a/firmware/ice40-riscv/icE1usb/e1.c +++ b/firmware/ice40-riscv/icE1usb/e1.c @@ -80,19 +80,17 @@ static volatile struct e1_core * const e1_regs = (void *)(E1_CORE_BASE); static volatile uint8_t * const e1_data = (void *)(E1_DATA_BASE); - -volatile uint8_t * -e1_data_ptr(int mf, int frame, int ts) -{ - return &e1_data[(mf << 9) | (frame << 5) | ts]; -} - unsigned int e1_data_ofs(int mf, int frame, int ts) { return (mf << 9) | (frame << 5) | ts; } +volatile uint8_t * +e1_data_ptr(int mf, int frame, int ts) +{ + return &e1_data[e1_data_ofs(mf, frame, ts)]; +} // FIFOs // ----- -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21706 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: I9a6cce07ea8b6eff1527215de00621da960b0472 Gerrit-Change-Number: 21706 Gerrit-PatchSet: 5 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-Reviewer: tnt <tnt at 246tNt.com> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201220/2fcec343/attachment.htm>