Skip to content

Conversation

@dbogdan
Copy link
Contributor

@dbogdan dbogdan commented May 21, 2018

The reset value of the attenuation is according to the datasheet 12 dB
but pdata->base.attenuation was incorrectly set to 0.

Signed-off-by: Dragos Bogdan dragos.bogdan@analog.com

The reset value of the attenuation is according to the datasheet 12 dB
but pdata->base.attenuation was incorrectly set to 0.

Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
return -EINVAL;
}

phy->pdata->base.attenuation = 0x0C;
Copy link
Contributor

Choose a reason for hiding this comment

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

I am just curious, shouldn't this information be retrieved from the devicetree? Just like the other members of the pdata->base field.

Choose a reason for hiding this comment

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

You could also argue the other way that the base data shouldn't be part of the platform data since it is not part of the hardware description. It's application configuration data.

Copy link
Contributor

Choose a reason for hiding this comment

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

We could consider a later update of the driver that handles this as config data.
For now this should be fine.

@stefpopa stefpopa closed this May 22, 2018
@stefpopa stefpopa reopened this May 22, 2018
@stefpopa
Copy link
Contributor

I apologize for closing this issue, I accidentally pressed the wrong button.

Copy link
Contributor

@commodo commodo left a comment

Choose a reason for hiding this comment

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

LGTM
Will merge this later today if no objections

@commodo commodo merged commit 8d483d3 into master May 22, 2018
@commodo commodo deleted the ad6676_attenuation branch May 22, 2018 10:46
github-actions bot pushed a commit that referenced this pull request Jul 29, 2025
…-for-cachestat-validation-checkpatch-fixes

ERROR: "foo* bar" should be "foo *bar"
#41: FILE: tools/testing/selftests/cachestat/test_cachestat.c:209:
+const char* file_type_str(enum file_type type) {

ERROR: open brace '{' following function definitions go on the next line
#41: FILE: tools/testing/selftests/cachestat/test_cachestat.c:209:
+const char* file_type_str(enum file_type type) {

ERROR: switch and case should be at the same indent
#42: FILE: tools/testing/selftests/cachestat/test_cachestat.c:210:
+	switch (type) {
+		case FILE_SHMEM:
[...]
+		case FILE_MMAP:
[...]
+		default:

ERROR: space required after that ',' (ctx:VxV)
#72: FILE: tools/testing/selftests/cachestat/test_cachestat.c:239:
+		ksft_print_msg("Unable to create %s file.\n",file_type_str(type));
 		                                            ^

ERROR: space required after that ',' (ctx:VxV)
#79: FILE: tools/testing/selftests/cachestat/test_cachestat.c:245:
+		ksft_print_msg("Unable to truncate %s file.\n",file_type_str(type));
 		                                              ^

ERROR: switch and case should be at the same indent
#88: FILE: tools/testing/selftests/cachestat/test_cachestat.c:249:
+	switch (type){
+		case FILE_SHMEM:
[...]
+		case FILE_MMAP:
[...]
+		default:

ERROR: space required before the open brace '{'
#88: FILE: tools/testing/selftests/cachestat/test_cachestat.c:249:
+	switch (type){

WARNING: Missing a blank line after declarations
#98: FILE: tools/testing/selftests/cachestat/test_cachestat.c:259:
+			char *map = mmap(NULL, filesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+			if (map == MAP_FAILED) {

WARNING: braces {} are not necessary for single statement blocks
#103: FILE: tools/testing/selftests/cachestat/test_cachestat.c:264:
+			for (int i = 0; i < filesize; i++) {
+				map[i] = 'A';
+			}

WARNING: break is not useful after a goto
#111: FILE: tools/testing/selftests/cachestat/test_cachestat.c:272:
+			goto close_fd;
+			break;

total: 7 errors, 3 warnings, 108 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/selftests-cachestat-add-tests-for-mmap-refactor-and-enhance-mmap-test-for-cachestat-validation.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suresh K C <suresh.k.chandrappa@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
github-actions bot pushed a commit that referenced this pull request Jul 30, 2025
…-for-cachestat-validation-checkpatch-fixes

ERROR: "foo* bar" should be "foo *bar"
#41: FILE: tools/testing/selftests/cachestat/test_cachestat.c:209:
+const char* file_type_str(enum file_type type) {

ERROR: open brace '{' following function definitions go on the next line
#41: FILE: tools/testing/selftests/cachestat/test_cachestat.c:209:
+const char* file_type_str(enum file_type type) {

ERROR: switch and case should be at the same indent
#42: FILE: tools/testing/selftests/cachestat/test_cachestat.c:210:
+	switch (type) {
+		case FILE_SHMEM:
[...]
+		case FILE_MMAP:
[...]
+		default:

ERROR: space required after that ',' (ctx:VxV)
#72: FILE: tools/testing/selftests/cachestat/test_cachestat.c:239:
+		ksft_print_msg("Unable to create %s file.\n",file_type_str(type));
 		                                            ^

ERROR: space required after that ',' (ctx:VxV)
#79: FILE: tools/testing/selftests/cachestat/test_cachestat.c:245:
+		ksft_print_msg("Unable to truncate %s file.\n",file_type_str(type));
 		                                              ^

ERROR: switch and case should be at the same indent
#88: FILE: tools/testing/selftests/cachestat/test_cachestat.c:249:
+	switch (type){
+		case FILE_SHMEM:
[...]
+		case FILE_MMAP:
[...]
+		default:

ERROR: space required before the open brace '{'
#88: FILE: tools/testing/selftests/cachestat/test_cachestat.c:249:
+	switch (type){

WARNING: Missing a blank line after declarations
#98: FILE: tools/testing/selftests/cachestat/test_cachestat.c:259:
+			char *map = mmap(NULL, filesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+			if (map == MAP_FAILED) {

WARNING: braces {} are not necessary for single statement blocks
#103: FILE: tools/testing/selftests/cachestat/test_cachestat.c:264:
+			for (int i = 0; i < filesize; i++) {
+				map[i] = 'A';
+			}

WARNING: break is not useful after a goto
#111: FILE: tools/testing/selftests/cachestat/test_cachestat.c:272:
+			goto close_fd;
+			break;

total: 7 errors, 3 warnings, 108 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/selftests-cachestat-add-tests-for-mmap-refactor-and-enhance-mmap-test-for-cachestat-validation.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suresh K C <suresh.k.chandrappa@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
github-actions bot pushed a commit that referenced this pull request Aug 1, 2025
…-for-cachestat-validation-checkpatch-fixes

ERROR: "foo* bar" should be "foo *bar"
#41: FILE: tools/testing/selftests/cachestat/test_cachestat.c:209:
+const char* file_type_str(enum file_type type) {

ERROR: open brace '{' following function definitions go on the next line
#41: FILE: tools/testing/selftests/cachestat/test_cachestat.c:209:
+const char* file_type_str(enum file_type type) {

ERROR: switch and case should be at the same indent
#42: FILE: tools/testing/selftests/cachestat/test_cachestat.c:210:
+	switch (type) {
+		case FILE_SHMEM:
[...]
+		case FILE_MMAP:
[...]
+		default:

ERROR: space required after that ',' (ctx:VxV)
#72: FILE: tools/testing/selftests/cachestat/test_cachestat.c:239:
+		ksft_print_msg("Unable to create %s file.\n",file_type_str(type));
 		                                            ^

ERROR: space required after that ',' (ctx:VxV)
#79: FILE: tools/testing/selftests/cachestat/test_cachestat.c:245:
+		ksft_print_msg("Unable to truncate %s file.\n",file_type_str(type));
 		                                              ^

ERROR: switch and case should be at the same indent
#88: FILE: tools/testing/selftests/cachestat/test_cachestat.c:249:
+	switch (type){
+		case FILE_SHMEM:
[...]
+		case FILE_MMAP:
[...]
+		default:

ERROR: space required before the open brace '{'
#88: FILE: tools/testing/selftests/cachestat/test_cachestat.c:249:
+	switch (type){

WARNING: Missing a blank line after declarations
#98: FILE: tools/testing/selftests/cachestat/test_cachestat.c:259:
+			char *map = mmap(NULL, filesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+			if (map == MAP_FAILED) {

WARNING: braces {} are not necessary for single statement blocks
#103: FILE: tools/testing/selftests/cachestat/test_cachestat.c:264:
+			for (int i = 0; i < filesize; i++) {
+				map[i] = 'A';
+			}

WARNING: break is not useful after a goto
#111: FILE: tools/testing/selftests/cachestat/test_cachestat.c:272:
+			goto close_fd;
+			break;

total: 7 errors, 3 warnings, 108 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/selftests-cachestat-add-tests-for-mmap-refactor-and-enhance-mmap-test-for-cachestat-validation.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suresh K C <suresh.k.chandrappa@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants