Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warnings, fixes, cleanups #32

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

konradybcio
Copy link
Member

  • get rid of recognizing sm8250-debugcc and alike
  • bring in warning-enabled CFLAGs from cdba
  • fix these warnings

@@ -207,32 +207,6 @@ static const struct debugcc_platform *find_platform(const char *name)
return NULL;
}

/**
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can not say that it is unnecessary. I frequenty run it as platform-debugcc instead of debugcc -p platform.

BTW: is your commit not signed-of, or is it a Github hiding that bit of the commit message?

Copy link
Contributor

Choose a reason for hiding this comment

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

Even better would be if debugcc could detect the platform and not have us accidentally map and read/write the wrong memory region for a different platform (resulting in an insta-crash usually).

I tend to do this a lot thanks to shell history.

Copy link
Member Author

Choose a reason for hiding this comment

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

@lumag xkcd 1172 😛

@MarijnS95 should be very doable.. we can probably just read the compatible from /sys/firmware/devicetree

@@ -192,7 +192,7 @@ static void measure(const struct measure_clk *clk)
return;
}

printf("%50s: %fMHz (%ldHz)\n", clk->name, clk_rate / 1000000.0, clk_rate);
printf("%50s: %fMHz (%luHz)\n", clk->name, clk_rate / 1000000.0, clk_rate);
Copy link
Collaborator

Choose a reason for hiding this comment

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

commit description?

@@ -144,317 +144,317 @@ static struct debug_mux video_cc = {

static struct measure_clk sm8650_clocks[] = {
/* GCC entries */
{ "gcc_aggre_noc_pcie_axi_clk", &gcc.mux, 0x3f },
Copy link
Collaborator

Choose a reason for hiding this comment

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

I usually like C99. However in this case struct initialisation becomes less readable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well either that or we have to fill out all magic fields to make the "struct is only partially initialized" warning (forgot the name) satisfied

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or disable the warning

Comment on lines +219 to +221
{ .name = "l2_m_clk", .clk_mux = &cpul2_mux, .mux = 0x2, 8 },
{ .name = "krait0_m_clk", .clk_mux = &cpul2_mux, .mux = 0x0, 8 },
{ .name = "krait1_m_clk", .clk_mux = &cpul2_mux, .mux = 0x1, 8 },
Copy link
Contributor

Choose a reason for hiding this comment

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

think the last value is missing?

Copy link
Member Author

Choose a reason for hiding this comment

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

It works out by total luck but you're right!

@Ansuel
Copy link
Contributor

Ansuel commented Nov 10, 2023

@konradybcio MAYBE to save reliability and mute the warning... we define a macro that define the full struct with the entry declared? And also add macro variants for the additional values? (like the case of ipq806x with the divider?)

@MarijnS95
Copy link
Contributor

@konradybcio MAYBE to save reliability and mute the warning... we define a macro that define the full struct with the entry declared? And also add macro variants for the additional values? (like the case of ipq806x with the divider?)

For the record we dropped exactly this pattern in favour of C99 struct initialization in the DPU catalog, to make entries more readable by having explicit names.

@lumag
Copy link
Collaborator

lumag commented Nov 11, 2023

@MarijnS95 ... And turning structs into multiline constructions, one field per line. I'm fine if that works approach is implemented here.

@lumag
Copy link
Collaborator

lumag commented May 21, 2024

@konradybcio do you have plans to finish this pull request?

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.

4 participants