Attention is currently required from: Hoernchen.
osmith has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330?usp=email )
Change subject: fw source: force reformat once and for all
......................................................................
Patch Set 1: Code-Review-1
(5 comments)
Patchset:
PS1:
went through the first files this patch touches and pointed out where the config would IMHO need to be adjusted to not do these kinds of reformattings
File ccid_common/ccid_device.c:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comment/71f02887_4c… :
PS1, Line 547: // break;
not useful IMHO. this is also in other places in this patch.
File ccid_common/ccid_proto.h:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comment/c3dbb98b_cc… :
PS1, Line 366: #define CCID_CMD_STATUS_TIME_EXT 0x80
here and in enum ccid_error_code below, it is more readable to keep the values directly below each other IMHO
File ccid_common/ccid_proto.c:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comment/237bb22e_2b… :
PS1, Line 70: { CCID_ERR_CMD_ABORTED, "CMD_ABORTED" },
> for the record, I don't think this is an improvement in readability at all.
+1
File ccid_common/iso7816_3.c:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comment/0b5ba4a2_68… :
PS1, Line 50: 0,
doesn't seem useful to reformat it like this?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Iacc086bb566551225e7a21b639a1ad2ec257484f
Gerrit-Change-Number: 42330
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Mar 2026 07:52:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: fixeria, laforge.
osmith has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42335?usp=email )
Change subject: Revert "clang-format: set ColumnLimit: 0"
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42335/comment/bab27f47_13… :
PS1, Line 11: Reason for revert: we don't want clang-format to actively generate arbitrarily long line lengths.
> According to https://clang.llvm.org/docs/ClangFormatStyleOptions. […]
I see now that this comes from https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comment/7b053680_9e…. But still, I think if we don't set this to 0, we run into other problems when it reformats other lines that look like they intentionally were kept shorter. For example:
```
diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c
index 0c56275..a3374ae 100644
--- a/ccid_common/ccid_slot_fsm.c
+++ b/ccid_common/ccid_slot_fsm.c
@@ -66,10 +66,8 @@ struct card_uart *cuart4slot_nr(uint8_t slot_nr)
return g_si.slot[slot_nr].cuart;
}
-static const uint8_t sysmousim_sjs1_atr[] = {
- 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31,
- 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20,
- 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 };
+static const uint8_t sysmousim_sjs1_atr[] = { 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31, 0xA0, 0x73, 0xBE,
+ 0x21, 0x13, 0x67, 0x43, 0x20, 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 };
```
...so I propose to adjust the config to not change any line breaks in order to not have it enforce different line breaks than what developers did intentionally (if this can be done with clang-format). I left another comment here: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comments/c54370ae_2…
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42335?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I49111af334e6967a9c3a63ccb9d179df444d63bb
Gerrit-Change-Number: 42335
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Mar 2026 07:44:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Attention is currently required from: Hoernchen.
osmith has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330?usp=email )
Change subject: fw source: force reformat once and for all
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
The approach I've taken with checkpatch (from linux.git) and how it is configured for Osmocom repositories is, that it should only complain about things that are clearly wrong. So it should rather *not* complain about something that may be right or may not be, than annoy the users with unhelpful errors. This is now working in what seems like 95% of all cases or so (I'm subscribed to the "lint errors" jenkins feed and checking regularly if it is complaining for wrong reasons and look into it, adjust it as it makes sense).
Could you configure clang-format to do this too? Otherwise we might want to reconsider if clang-format is a good fit for our linting requirements.
I'd also be interested in what advantages clang-format gives you. There are some downsides to having two tools, they will probably always disagree on some things, we need to maintain an additional config and the reporting isn't inline as gerrit comments when compared to how we have it set up for checkpatch now.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Iacc086bb566551225e7a21b639a1ad2ec257484f
Gerrit-Change-Number: 42330
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Mar 2026 07:42:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: fixeria, laforge.
osmith has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42335?usp=email )
Change subject: Revert "clang-format: set ColumnLimit: 0"
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42335/comment/0cfff249_91… :
PS1, Line 11: Reason for revert: we don't want clang-format to actively generate arbitrarily long line lengths.
According to https://clang.llvm.org/docs/ClangFormatStyleOptions.html#columnlimit, this is not how it works:
> A column limit of 0 means that there is no column limit. In this case,
> clang-format will respect the input’s line breaking decisions within
> statements unless they contradict other rules.
"respect the input's line breaking decisions" sounds like what we would like to have from code review I've seen, if we set any line length then it will generate lines with the given length.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42335?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I49111af334e6967a9c3a63ccb9d179df444d63bb
Gerrit-Change-Number: 42335
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Mar 2026 07:14:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: Hoernchen, osmith.
laforge has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330?usp=email )
Change subject: fw source: force reformat once and for all
......................................................................
Patch Set 1:
(1 comment)
File ccid_common/iso7816_fsm.c:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comment/f82608a6_51… :
PS1, Line 818: .in_event_mask = S(ISO7816_E_RX_SINGLE) | S(ISO7816_E_RX_COMPL) | S(ISO7816_E_TX_COMPL) | S(ISO7816_E_RX_ERR_IND) | S(ISO7816_E_TX_ERR_IND) | S(ISO7816_E_TPDU_DONE_IND),
> well that is in part easy to explain: https://gerrit.osmocom. […]
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42335
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Iacc086bb566551225e7a21b639a1ad2ec257484f
Gerrit-Change-Number: 42330
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 12 Mar 2026 23:32:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Hoernchen has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42331?usp=email )
Change subject: fw: add git blame ignore file
......................................................................
Patch Set 1: Code-Review-2
(1 comment)
Patchset:
PS1:
this must contain the hash of the previous commit that changes the formatting, so putting this on hold here to ensure we do not end up commiting a wrong hash due to updates/rework of the preceding format commit
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42331?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I35b86f52d491c9e28ab0af9e3e3d4fd5f6dbd119
Gerrit-Change-Number: 42331
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 12 Mar 2026 21:15:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: laforge, osmith.
Hoernchen has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330?usp=email )
Change subject: fw source: force reformat once and for all
......................................................................
Patch Set 1:
(1 comment)
File ccid_common/iso7816_fsm.c:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comment/3c27f976_57… :
PS1, Line 818: .in_event_mask = S(ISO7816_E_RX_SINGLE) | S(ISO7816_E_RX_COMPL) | S(ISO7816_E_TX_COMPL) | S(ISO7816_E_RX_ERR_IND) | S(ISO7816_E_TX_ERR_IND) | S(ISO7816_E_TPDU_DONE_IND),
> I also don't consider this an improvement inreadability; it also goes far beyond the 120 chasr / lin […]
well that is in part easy to explain: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42227 there is apparently no 120 limit anymore because someone turned off a month ago.. i suppose a more fine grained limit makes sense.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Iacc086bb566551225e7a21b639a1ad2ec257484f
Gerrit-Change-Number: 42330
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 12 Mar 2026 21:08:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: Hoernchen, osmith.
laforge has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330?usp=email )
Change subject: fw source: force reformat once and for all
......................................................................
Patch Set 1:
(5 comments)
Patchset:
PS1:
... except t
File ccid_common/ccid_proto.c:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comment/faff0ac8_90… :
PS1, Line 70: { CCID_ERR_CMD_ABORTED, "CMD_ABORTED" },
for the record, I don't think this is an improvement in readability at all.
File ccid_common/iso7816_fsm.c:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comment/c33bb1c9_57… :
PS1, Line 168: static const uint8_t convention_convert_lut[256] = {
> Formating this is wrong.
yeah, that looks like it's not intended.
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comment/7b053680_9e… :
PS1, Line 818: .in_event_mask = S(ISO7816_E_RX_SINGLE) | S(ISO7816_E_RX_COMPL) | S(ISO7816_E_TX_COMPL) | S(ISO7816_E_RX_ERR_IND) | S(ISO7816_E_TX_ERR_IND) | S(ISO7816_E_TPDU_DONE_IND),
I also don't consider this an improvement inreadability; it also goes far beyond the 120 chasr / line limit. Maybe the linter rules are not good enough yet?
File sysmoOCTSIM/usb_descriptors.c:
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330/comment/5c6c5baf_de… :
PS1, Line 227: 4,
this also clearly is not an improvement of readability at all.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42330?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Iacc086bb566551225e7a21b639a1ad2ec257484f
Gerrit-Change-Number: 42330
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 12 Mar 2026 20:29:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu>