I have the following structures:
struct sched_param {
    union {
        int sched_priority;
        struct lshort_sched_param lshort_params;
    };
};
struct lshort_sched_param {
    int requested_time;
    int level;
};
Whenever I make a sched_param param1 structure and try to update the param1.sched_priority field I get the message written in the topic.
struct sched_param param1;
param1.sched_priority = 1;
But, whenever I make a sched_param param2 and try to update the param2.lshort_params.level it works good.
struct sched_param param2;
param2.lshort_params.level= 1;
What could be the reason?