staging: iio: accel: Group similar macros into enums
Subsystems (4)
cover staging: iio: accel: Group similar macros into enums
Group related macros into enums, for clarity.
Narcisa Ana Maria Vasile (2):
staging: iio: adis16209: Group similar macros into enums
staging: iio: adis16240: Group similar macros into enums
drivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/2 staging: iio: adis16209: Group similar macros into enums
Group the scan indexes into an enum.
--- drivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/staging/iio/accel/adis16209.c +10 -8
@@ -152,14 +152,16 @@#define ADIS16209_ERROR_ACTIVE BIT(14) -#define ADIS16209_SCAN_SUPPLY 0 -#define ADIS16209_SCAN_ACC_X 1 -#define ADIS16209_SCAN_ACC_Y 2 -#define ADIS16209_SCAN_AUX_ADC 3 -#define ADIS16209_SCAN_TEMP 4 -#define ADIS16209_SCAN_INCLI_X 5 -#define ADIS16209_SCAN_INCLI_Y 6 -#define ADIS16209_SCAN_ROT 7 +enum adis16209_scan { +ADIS16209_SCAN_SUPPLY , +ADIS16209_SCAN_ACC_X , +ADIS16209_SCAN_ACC_Y , +ADIS16209_SCAN_AUX_ADC , +ADIS16209_SCAN_TEMP , +ADIS16209_SCAN_INCLI_X , +ADIS16209_SCAN_INCLI_Y , +ADIS16209_SCAN_ROT , +};static const u8 adis16209_addresses[8 ][1 ] = { [ADIS16209_SCAN_SUPPLY ] = { },
Signature · 1 line
1.9.1
Jonathan Cameron
maintainerRe: [PATCH 1/2] staging: iio: adis16209: Group similar macros into enums
Quoted 3 lines · Narcisa Ana Maria Vasile
Group the scan indexes into an enum.
Signed-off-by Narcisa Ana Maria Vasile <[email protected]>
Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.
Thanks,
Jonathan
Quoted 34 lines
--- drivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)drivers/staging/iio/accel/adis16209.c +10
-8@@ -152,14 +152,16 @@#define ADIS16209_ERROR_ACTIVE BIT(14) -#define ADIS16209_SCAN_SUPPLY 0 -#define ADIS16209_SCAN_ACC_X 1 -#define ADIS16209_SCAN_ACC_Y 2 -#define ADIS16209_SCAN_AUX_ADC 3 -#define ADIS16209_SCAN_TEMP 4 -#define ADIS16209_SCAN_INCLI_X 5 -#define ADIS16209_SCAN_INCLI_Y 6 -#define ADIS16209_SCAN_ROT 7 +enum adis16209_scan { +ADIS16209_SCAN_SUPPLY , +ADIS16209_SCAN_ACC_X , +ADIS16209_SCAN_ACC_Y , +ADIS16209_SCAN_AUX_ADC , +ADIS16209_SCAN_TEMP , +ADIS16209_SCAN_INCLI_X , +ADIS16209_SCAN_INCLI_Y , +ADIS16209_SCAN_ROT , +};static const u8 adis16209_addresses[8 ][1 ] = { [ADIS16209_SCAN_SUPPLY ] = { },
PATCH 2/2 staging: iio: adis16240: Group similar macros into enums
In reply to Narcisa Ana Maria VasileGroup the scan indexes into an enum.
--- drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/staging/iio/accel/adis16240.c +8 -6
@@ -192,12 +192,14 @@* filling. This may change! */ -#define ADIS16240_SCAN_ACC_X 0 -#define ADIS16240_SCAN_ACC_Y 1 -#define ADIS16240_SCAN_ACC_Z 2 -#define ADIS16240_SCAN_SUPPLY 3 -#define ADIS16240_SCAN_AUX_ADC 4 -#define ADIS16240_SCAN_TEMP 5 +enum adis16240_scan { +ADIS16240_SCAN_ACC_X , +ADIS16240_SCAN_ACC_Y , +ADIS16240_SCAN_ACC_Z , +ADIS16240_SCAN_SUPPLY , +ADIS16240_SCAN_AUX_ADC , +ADIS16240_SCAN_TEMP , +}; static ssize_t adis16240_spi_read_signed(struct device *dev, struct device_attribute *attr,
Signature · 1 line
1.9.1
Re: [PATCH 2/2] staging: iio: adis16240: Group similar macros into enums
Quoted 3 lines · Narcisa Ana Maria Vasile
Group the scan indexes into an enum.
Signed-off-by Narcisa Ana Maria Vasile <[email protected]>
Applied.
Busy week / weekend so sorry for delay on these!
Jonathan
Quoted 30 lines
--- drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)drivers/staging/iio/accel/adis16240.c +8
-6@@ -192,12 +192,14 @@* filling. This may change! */ -#define ADIS16240_SCAN_ACC_X 0 -#define ADIS16240_SCAN_ACC_Y 1 -#define ADIS16240_SCAN_ACC_Z 2 -#define ADIS16240_SCAN_SUPPLY 3 -#define ADIS16240_SCAN_AUX_ADC 4 -#define ADIS16240_SCAN_TEMP 5 +enum adis16240_scan { +ADIS16240_SCAN_ACC_X , +ADIS16240_SCAN_ACC_Y , +ADIS16240_SCAN_ACC_Z , +ADIS16240_SCAN_SUPPLY , +ADIS16240_SCAN_AUX_ADC , +ADIS16240_SCAN_TEMP , +}; static ssize_t adis16240_spi_read_signed(struct device *dev, struct device_attribute *attr,
Quoted 1 line · Narcisa Ana Maria Vasile
Group related macros into enums, for clarity.
Hi Narcisa,
Is this enum then used in a type declaration?
BTW - I can see Jonathan is following right along and sweeping these up, but for future reference, this patch depended on a previous patch sent hours earlier, that was not yet in staging-testing. When this happens, one option is to give a note below the --- (as you would for version comments) stating the dependency. This way someone reviewing the patch doesn't simply reject it as not applying to my tree.
alisons
Quoted 17 lines
Narcisa Ana Maria Vasile (2):
staging: iio: adis16209: Group similar macros into enums
staging: iio: adis16240: Group similar macros into enumsdrivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-)Signature · 8 lines
1.9.1 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1488730643.git.narcisaanamaria12%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Quoted 7 lines · Alison Schofield
Quoted 1 line · Narcisa Ana Maria Vasile
Group related macros into enums, for clarity.
Hi Narcisa,
Is this enum then used in a type declaration?
Quoted 9 lines
BTW - I can see Jonathan is following right along and sweeping these up, but for future reference, this patch depended on a previous patch sent hours earlier, that was not yet in staging-testing. When this happens, one option is to give a note below the --- (as you would for version comments) stating the dependency. This way someone reviewing the patch doesn't simply reject it as not applying to my tree.
alisons
Hi,
Do you mean whether there are any type declarations where I could now replace the type with the enum type ? If so, I searched for these type of situations, but didn't find any. If I missed one of these cases, please let me know and I'll send a new patch.
Thank you for the note about the patch dependencies. I was just about to ask about this, cause I realized there might be a problem. I'll keep in mind to make a note next time.
Narcisa
Quoted 17 lines
Quoted 17 lines
Narcisa Ana Maria Vasile (2):
staging: iio: adis16209: Group similar macros into enums
staging: iio: adis16240: Group similar macros into enumsdrivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-)Signature · 8 lines
1.9.1 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1488730643.git.narcisaanamaria12%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Quoted 15 lines · Narcisa Ana Maria Vasile
Quoted 14 lines · Alison Schofield
Quoted 1 line · Narcisa Ana Maria Vasile
Group related macros into enums, for clarity.
Hi Narcisa,
Is this enum then used in a type declaration?
BTW - I can see Jonathan is following right along and sweeping these up, but for future reference, this patch depended on a previous patch sent hours earlier, that was not yet in staging-testing. When this happens, one option is to give a note below the --- (as you would for version comments) stating the dependency. This way someone reviewing the patch doesn't simply reject it as not applying to my tree.
Quoted 8 lines
Quoted 2 lines
alisons
Hi,
Do you mean whether there are any type declarations where I could now replace the type with the enum type ? If so, I searched for these type of situations, but didn't find any. If I missed one of these cases, please let me know and I'll send a new patch.
Typically the constant would be stored in something, compared to something, etc. Are these constants not used at all?
julia
Quoted 32 lines
Thank you for the note about the patch dependencies. I was just about to ask about this, cause I realized there might be a problem. I'll keep in mind to make a note next time.
Narcisa
Quoted 11 lines
Quoted 11 lines
Narcisa Ana Maria Vasile (2):
staging: iio: adis16209: Group similar macros into enums
staging: iio: adis16240: Group similar macros into enumsdrivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-)--
1.9.1Quoted 6 lines
Quoted 6 lines
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1488730643.git.narcisaanamaria12%40gmail.com.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305191459.GA20822%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.
Quoted 28 lines · Julia Lawall
Quoted 15 lines · Narcisa Ana Maria Vasile
Quoted 14 lines · Alison Schofield
Quoted 1 line · Narcisa Ana Maria Vasile
Group related macros into enums, for clarity.
Hi Narcisa,
Is this enum then used in a type declaration?
BTW - I can see Jonathan is following right along and sweeping these up, but for future reference, this patch depended on a previous patch sent hours earlier, that was not yet in staging-testing. When this happens, one option is to give a note below the --- (as you would for version comments) stating the dependency. This way someone reviewing the patch doesn't simply reject it as not applying to my tree.
Quoted 8 lines
Quoted 2 lines
alisons
Hi,
Do you mean whether there are any type declarations where I could now replace the type with the enum type ? If so, I searched for these type of situations, but didn't find any. If I missed one of these cases, please let me know and I'll send a new patch.
Quoted 6 lines
Typically the constant would be stored in something, compared to something, etc. Are these constants not used at all?
julia
Yes, they are used, they are stored. I thought she was asking if I encountered any situations like in adc/ad7280a.h file where you could define an enum for conversion averaging macros and replace the 'unsigned int' field in the ad7280_platform_data with the enum type.
Narcisa
Quoted 32 lines
Quoted 32 lines
Thank you for the note about the patch dependencies. I was just about to ask about this, cause I realized there might be a problem. I'll keep in mind to make a note next time.
Narcisa
Quoted 11 lines
Quoted 11 lines
Narcisa Ana Maria Vasile (2):
staging: iio: adis16209: Group similar macros into enums
staging: iio: adis16240: Group similar macros into enumsdrivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-)--
1.9.1Quoted 6 lines
Quoted 6 lines
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1488730643.git.narcisaanamaria12%40gmail.com.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305191459.GA20822%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.
Quoted 32 lines · Narcisa Ana Maria Vasile
Quoted 31 lines · Julia Lawall
Quoted 15 lines · Narcisa Ana Maria Vasile
Quoted 14 lines · Alison Schofield
Quoted 1 line · Narcisa Ana Maria Vasile
Group related macros into enums, for clarity.
Hi Narcisa,
Is this enum then used in a type declaration?
BTW - I can see Jonathan is following right along and sweeping these up, but for future reference, this patch depended on a previous patch sent hours earlier, that was not yet in staging-testing. When this happens, one option is to give a note below the --- (as you would for version comments) stating the dependency. This way someone reviewing the patch doesn't simply reject it as not applying to my tree.
Quoted 8 lines
Quoted 2 lines
alisons
Hi,
Do you mean whether there are any type declarations where I could now replace the type with the enum type ? If so, I searched for these type of situations, but didn't find any. If I missed one of these cases, please let me know and I'll send a new patch.
Typically the constant would be stored in something, compared to something, etc. Are these constants not used at all?
Quoted 8 lines
Quoted 3 lines
julia
Yes, they are used, they are stored. I thought she was asking if I encountered any situations like in
adc/ad7280a.hfile where you could define an enum for conversion averaging macros and replace the 'unsigned int' field in thead7280_platform_datawith the enum type.
If they are stored in something, I guess you could change the type of that thing?
julia
Quoted 42 lines
Narcisa
Quoted 25 lines
Quoted 25 lines
Thank you for the note about the patch dependencies. I was just about to ask about this, cause I realized there might be a problem. I'll keep in mind to make a note next time.
Narcisa
Quoted 17 lines
Quoted 17 lines
Narcisa Ana Maria Vasile (2):
staging: iio: adis16209: Group similar macros into enums
staging: iio: adis16240: Group similar macros into enumsdrivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-)--
1.9.1--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1488730643.git.narcisaanamaria12%40gmail.com.
For more options, visit https://groups.google.com/d/optout.Quoted 7 lines
Quoted 7 lines
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305191459.GA20822%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305192840.GA12508%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.
Quoted 45 lines · Julia Lawall
Quoted 32 lines · Narcisa Ana Maria Vasile
Quoted 31 lines · Julia Lawall
Quoted 15 lines · Narcisa Ana Maria Vasile
Quoted 14 lines · Alison Schofield
Quoted 1 line · Narcisa Ana Maria Vasile
Group related macros into enums, for clarity.
Hi Narcisa,
Is this enum then used in a type declaration?
BTW - I can see Jonathan is following right along and sweeping these up, but for future reference, this patch depended on a previous patch sent hours earlier, that was not yet in staging-testing. When this happens, one option is to give a note below the --- (as you would for version comments) stating the dependency. This way someone reviewing the patch doesn't simply reject it as not applying to my tree.
Quoted 8 lines
Quoted 2 lines
alisons
Hi,
Do you mean whether there are any type declarations where I could now replace the type with the enum type ? If so, I searched for these type of situations, but didn't find any. If I missed one of these cases, please let me know and I'll send a new patch.
Typically the constant would be stored in something, compared to something, etc. Are these constants not used at all?
Quoted 8 lines
Quoted 3 lines
julia
Yes, they are used, they are stored. I thought she was asking if I encountered any situations like in
adc/ad7280a.hfile where you could define an enum for conversion averaging macros and replace the 'unsigned int' field in thead7280_platform_datawith the enum type.
Quoted 5 lines
If they are stored in something, I guess you could change the type of that thing?
julia
The scan indexes(si) are given to macros such as:
#define ADIS_ACCEL_CHAN(mod, addr, si, info_sep, info_all, bits) \
ADIS_MOD_CHAN(IIO_ACCEL, mod, addr, si, info_sep, info_all, bits) (defined in the linux/iio/imu/adis.h header). which are used to initialize the adis162xx_channels[].
Since they are used like this, I don't see anything I can replace/improve here.
Am I missing something?
Narcisa.
Quoted 42 lines
Quoted 42 lines
Narcisa
Quoted 25 lines
Quoted 25 lines
Thank you for the note about the patch dependencies. I was just about to ask about this, cause I realized there might be a problem. I'll keep in mind to make a note next time.
Narcisa
Quoted 17 lines
Quoted 17 lines
Narcisa Ana Maria Vasile (2):
staging: iio: adis16209: Group similar macros into enums
staging: iio: adis16240: Group similar macros into enumsdrivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-)--
1.9.1--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1488730643.git.narcisaanamaria12%40gmail.com.
For more options, visit https://groups.google.com/d/optout.Quoted 7 lines
Quoted 7 lines
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305191459.GA20822%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305192840.GA12508%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.
Quoted 51 lines · Narcisa Ana Maria Vasile
Quoted 45 lines · Julia Lawall
Quoted 32 lines · Narcisa Ana Maria Vasile
Quoted 31 lines · Julia Lawall
Quoted 15 lines · Narcisa Ana Maria Vasile
Quoted 14 lines · Alison Schofield
Quoted 1 line · Narcisa Ana Maria Vasile
Group related macros into enums, for clarity.
Hi Narcisa,
Is this enum then used in a type declaration?
BTW - I can see Jonathan is following right along and sweeping these up, but for future reference, this patch depended on a previous patch sent hours earlier, that was not yet in staging-testing. When this happens, one option is to give a note below the --- (as you would for version comments) stating the dependency. This way someone reviewing the patch doesn't simply reject it as not applying to my tree.
Quoted 8 lines
Quoted 2 lines
alisons
Hi,
Do you mean whether there are any type declarations where I could now replace the type with the enum type ? If so, I searched for these type of situations, but didn't find any. If I missed one of these cases, please let me know and I'll send a new patch.
Typically the constant would be stored in something, compared to something, etc. Are these constants not used at all?
Quoted 8 lines
Quoted 3 lines
julia
Yes, they are used, they are stored. I thought she was asking if I encountered any situations like in
adc/ad7280a.hfile where you could define an enum for conversion averaging macros and replace the 'unsigned int' field in thead7280_platform_datawith the enum type.Quoted 5 lines
If they are stored in something, I guess you could change the type of that thing?
julia
Quoted 7 lines
The scan indexes(si) are given to macros such as:
#define ADIS_ACCEL_CHAN(mod, addr, si, info_sep, info_all, bits) \ ADIS_MOD_CHAN(IIO_ACCEL, mod, addr, si, info_sep, info_all, bits)(defined in the
linux/iio/imu/adis.hheader). which are used to initialize the adis162xx_channels[].
OK, if the values are going in the si argument, then they end up in the scan_index field of the iio_chan_spec structure. That structure is much more general then your driver, so indeed, there seems to be no types that can be improved.
julia
Quoted 60 lines
Since they are used like this, I don't see anything I can replace/improve here.
Am I missing something?Narcisa.
Quoted 35 lines
Quoted 35 lines
Narcisa
Quoted 32 lines
Quoted 32 lines
Thank you for the note about the patch dependencies. I was just about to ask about this, cause I realized there might be a problem. I'll keep in mind to make a note next time.
Narcisa
Quoted 11 lines
Quoted 11 lines
Narcisa Ana Maria Vasile (2):
staging: iio: adis16209: Group similar macros into enums
staging: iio: adis16240: Group similar macros into enumsdrivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-)--
1.9.1Quoted 6 lines
Quoted 6 lines
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1488730643.git.narcisaanamaria12%40gmail.com.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305191459.GA20822%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.Quoted 7 lines
Quoted 7 lines
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305192840.GA12508%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305194845.GA27902%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.
Quoted 63 lines · Julia Lawall
Quoted 51 lines · Narcisa Ana Maria Vasile
Quoted 45 lines · Julia Lawall
Quoted 32 lines · Narcisa Ana Maria Vasile
Quoted 31 lines · Julia Lawall
Quoted 15 lines · Narcisa Ana Maria Vasile
Quoted 14 lines · Alison Schofield
Quoted 1 line · Narcisa Ana Maria Vasile
Group related macros into enums, for clarity.
Hi Narcisa,
Is this enum then used in a type declaration?
BTW - I can see Jonathan is following right along and sweeping these up, but for future reference, this patch depended on a previous patch sent hours earlier, that was not yet in staging-testing. When this happens, one option is to give a note below the --- (as you would for version comments) stating the dependency. This way someone reviewing the patch doesn't simply reject it as not applying to my tree.
Quoted 8 lines
Quoted 2 lines
alisons
Hi,
Do you mean whether there are any type declarations where I could now replace the type with the enum type ? If so, I searched for these type of situations, but didn't find any. If I missed one of these cases, please let me know and I'll send a new patch.
Typically the constant would be stored in something, compared to something, etc. Are these constants not used at all?
Quoted 8 lines
Quoted 3 lines
julia
Yes, they are used, they are stored. I thought she was asking if I encountered any situations like in
adc/ad7280a.hfile where you could define an enum for conversion averaging macros and replace the 'unsigned int' field in thead7280_platform_datawith the enum type.Quoted 5 lines
If they are stored in something, I guess you could change the type of that thing?
julia
Quoted 7 lines
The scan indexes(si) are given to macros such as:
#define ADIS_ACCEL_CHAN(mod, addr, si, info_sep, info_all, bits) \ ADIS_MOD_CHAN(IIO_ACCEL, mod, addr, si, info_sep, info_all, bits)(defined in the
linux/iio/imu/adis.hheader). which are used to initialize the adis162xx_channels[].
Quoted 6 lines
OK, if the values are going in the si argument, then they end up in the
scan_indexfield of theiio_chan_specstructure. That structure is much more general then your driver, so indeed, there seems to be no types that can be improved.julia
Hey Narcisa,
Great to see you traced it all the way through!
alisons
Quoted 61 lines
Quoted 61 lines
Since they are used like this, I don't see anything I can replace/improve here.
Am I missing something?Narcisa.
Quoted 35 lines
Quoted 35 lines
Narcisa
Quoted 32 lines
Quoted 32 lines
Thank you for the note about the patch dependencies. I was just about to ask about this, cause I realized there might be a problem. I'll keep in mind to make a note next time.
Narcisa
Quoted 11 lines
Quoted 11 lines
Narcisa Ana Maria Vasile (2):
staging: iio: adis16209: Group similar macros into enums
staging: iio: adis16240: Group similar macros into enumsdrivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-)--
1.9.1Quoted 6 lines
Quoted 6 lines
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1488730643.git.narcisaanamaria12%40gmail.com.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305191459.GA20822%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.Quoted 7 lines
Quoted 7 lines
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305192840.GA12508%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170305194845.GA27902%40nati-X550JK.
For more options, visit https://groups.google.com/d/optout.