-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fix build error with message: invalid initializer on 4.10.0 version kernel. #63
base: master
Are you sure you want to change the base?
Conversation
|
On Fri, Sep 27, 2024 at 06:52:08PM -0700, Yang sheng wrote:
> Please do understand there is something as _"commit summary"_ and _"commit message"_.
1. Maybe I need to change the commit message later.
Just do it
> And make the commit message matching the actual change.
>
2. As you can see the commit of torvalds/linux@2456e85. The changes of ``ktime_t`` type was in ``v4.10.rc1``, so I add a compare with **KERNEL_VERSION(4,10,0)**。
Current commit message says 3.10, actual change says 4.10.
Groeten
Geert Stappers
--
Silence is hard to parse
|
There was an update.
Now waiting on a new attempt. |
As you can see, I changed the commit message.😊 |
On Sat, Sep 28, 2024 at 03:49:31AM -0700, Yang sheng wrote:
I changed the commit message.😊
Still waiting on a new attempt.
|
kernel See torvalds/linux@2456e85 Signed-off-by: iysheng <[email protected]>
How about the new commit message, I changed again. |
|
On Sat, Sep 28, 2024 at 06:28:23AM -0700, Geert Stappers wrote:
***@***.***:~/src/githubforks/tty0tty
$ git show
commit 0bc63b7
Author: iysheng ***@***.***>
Date: Fri Sep 27 18:36:57 2024 +0000
Fix build error with message: invalid initializer on < 4.10.0 version
kernel
See torvalds/linux@2456e85
Signed-off-by: iysheng ***@***.***>
diff --git a/module/tty0tty.c b/module/tty0tty.c
index 03a7455..3224675 100644
--- a/module/tty0tty.c
+++ b/module/tty0tty.c
@@ -228,7 +228,11 @@ static int tty0tty_write(struct tty_struct *tty, const unsigned char *buffer,
int retval = 0;
struct tty_struct *ttyx = NULL;
u64 elapsed, delay;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
ktime_t start_time = ktime_get_ns();
+#else
+ u64 start_time = ktime_get_ns();
+#endif
if (!tty0tty)
return -ENODEV;
***@***.***:~/src/githubforks/tty0tty
$
The next attempt has a much better commit message.
Groeten
Geert Stappers
--
Silence is hard to parse
|
tks, do you have any better suggestions? |
On Sat, Sep 28, 2024 at 05:07:21PM -0700, Yang sheng wrote:
> On Sat, Sep 28, 2024 at 06:28:23AM -0700, Geert Stappers wrote:
> > $ git show
> > commit 0bc63b7
> >
> > Fix build error with message: invalid initializer on < 4.10.0 version kernel
> >
> > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
>
> The next attempt has a much better commit message.
>
tks, do you have any better suggestions?
Commit 9452a60 as a commit message with a **why**
and with a commit summary below the maximum of 50 characters.
And it is **without** contradicting actual change and commit message.
(It has no conflict "< 4.10" versus ">= 4.10".)
Groeten
Geert Stappers
P.S.
Please "acknowledge" by closing the merge request.
--
Silence is hard to parse
|
Add kernel version compare based on torvalds/linux@2456e85