Error in read EEprom in ESP8266

Hi, someone can help me, I’m trying to write and read long data in an eeprom memory of an ESP8266, but when reading the memory I always get zero, what is my error?

Here is my code:

#include <EEPROM.h>

int addr = 0;
long data = 65123;
byte high;
byte low;

void write_EEprom(long datax){
  EEPROM.write(0, highByte(datax));
  EEPROM.write(1, lowByte(datax));
  EEPROM.commit(); 
  }

void read_EEprom(long datax){
  high = EEPROM.read(0); 
  low = EEPROM.read(1); 
  datax = long((high << 8) + low);
  }

  
void setup(){
  Serial.begin(115200); 
  EEPROM.begin(512);  

  write_EEprom(data);

  data = 0;
  read_EEprom(data);
  
  Serial.print("El Dato1: ");   
  Serial.println(data);
  Serial.print("\n");  

  data++;
  write_EEprom(data);  

  data = 0;
  read_EEprom(data);
  
  Serial.print("El Dato2: ");   
  Serial.println(data);
  Serial.print("\n"); 
}
 
void loop(){
  delay(10);   
}
void read_EEprom(long datax){
  high = EEPROM.read(0);
  low = EEPROM.read(1);
  datax = long((high << 8) + low);
  }

That makes no sense and nothing is returned by the function.

long read_EEprom(){
  high = EEPROM.read(0);
  low = EEPROM.read(1);
  datax = long((high << 8) + low);
  return datax;
  }

Makes more sense. The function will then return a long data type.

read_EEprom(data);

Called that way the return value (if it had one) is discarded.

data = read_EEprom();

If the code for the read function is modified to return a value the above is a way to call the function.

Or, you could pass the value to the function by reference:

void read_EEprom(long &datax)
{ // Down here, where the damned thing belongs
  high = EEPROM.read(0);
  low = EEPROM.read(1);
  datax = long((high << 8) + low);
}

Then, after this is called, the variable passed to the function IS modified.